Skip to content

Commit cbde9ee

Browse files
committed
Allow docID == NO_MORE_DOCS in AssertingDocValues#intoBitSet (#14555)
1 parent 7a21f53 commit cbde9ee

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lucene/test-framework/src/java/org/apache/lucene/tests/index/AssertingLeafReader.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ public boolean advanceExact(int target) throws IOException {
770770
@Override
771771
public void intoBitSet(int upTo, FixedBitSet bitSet, int offset) throws IOException {
772772
assertThread("Numeric doc values", creationThread);
773-
assert exists;
773+
assert exists || docID() == NO_MORE_DOCS;
774774
assert docID() != -1;
775775
assert offset <= docID();
776776
in.intoBitSet(upTo, bitSet, offset);
@@ -871,7 +871,7 @@ public boolean advanceExact(int target) throws IOException {
871871
@Override
872872
public void intoBitSet(int upTo, FixedBitSet bitSet, int offset) throws IOException {
873873
assertThread("Binary doc values", creationThread);
874-
assert exists;
874+
assert exists || docID() == NO_MORE_DOCS;
875875
assert docID() != -1;
876876
assert offset <= docID();
877877
in.intoBitSet(upTo, bitSet, offset);
@@ -973,7 +973,7 @@ public boolean advanceExact(int target) throws IOException {
973973
@Override
974974
public void intoBitSet(int upTo, FixedBitSet bitSet, int offset) throws IOException {
975975
assertThread("Sorted doc values", creationThread);
976-
assert exists;
976+
assert exists || docID() == NO_MORE_DOCS;
977977
assert docID() != -1;
978978
assert offset <= docID();
979979
in.intoBitSet(upTo, bitSet, offset);
@@ -1111,7 +1111,7 @@ public boolean advanceExact(int target) throws IOException {
11111111
@Override
11121112
public void intoBitSet(int upTo, FixedBitSet bitSet, int offset) throws IOException {
11131113
assertThread("Sorted numeric doc values", creationThread);
1114-
assert exists;
1114+
assert exists || docID() == NO_MORE_DOCS;
11151115
assert docID() != -1;
11161116
assert offset <= docID();
11171117
in.intoBitSet(upTo, bitSet, offset);
@@ -1235,7 +1235,7 @@ public boolean advanceExact(int target) throws IOException {
12351235
@Override
12361236
public void intoBitSet(int upTo, FixedBitSet bitSet, int offset) throws IOException {
12371237
assertThread("Sorted set doc values", creationThread);
1238-
assert exists;
1238+
assert exists || docID() == NO_MORE_DOCS;
12391239
assert docID() != -1;
12401240
assert offset <= docID();
12411241
in.intoBitSet(upTo, bitSet, offset);

0 commit comments

Comments
 (0)