Skip to content

Commit a8b503f

Browse files
authored
Advance doc instead of offset in competitive iterator (#14530)
1 parent 9189776 commit a8b503f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lucene/CHANGES.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Bug Fixes
107107
* GITHUB#14522: Fix DISIDocIdStream::count so that it does not try to count beyond max.
108108
(Chris Hegarty)
109109

110-
* GITHUB#14523: Correct TermOrdValComparator competitive iterator so that it forces sparse
110+
* GITHUB#14523, GITHUB#14530: Correct TermOrdValComparator competitive iterator so that it forces sparse
111111
field iteration to be at least scoring window baseline when doing intoBitSet. (Ben Trent, Adrien Grand)
112112

113113
======================= Lucene 10.2.0 =======================

lucene/core/src/java/org/apache/lucene/search/comparators/TermOrdValComparator.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,8 @@ public void intoBitSet(int upTo, FixedBitSet bitSet, int offset) throws IOExcept
533533
if (disjunction == null) {
534534
if (docsWithField != null) {
535535
// we need to be absolutely sure that the iterator is at least at offset
536-
if (docsWithField.docID() < offset) {
537-
docsWithField.advance(offset);
536+
if (docsWithField.docID() < doc) {
537+
docsWithField.advance(doc);
538538
}
539539
docsWithField.intoBitSet(upTo, bitSet, offset);
540540
doc = docsWithField.docID();

0 commit comments

Comments
 (0)