Skip to content

Commit 02cf96b

Browse files
committed
Advance doc instead of offset in competitive iterator (#14530)
1 parent ae6484f commit 02cf96b

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
@@ -11,7 +11,7 @@ Bug Fixes
1111
* GITHUB#14522: Fix DISIDocIdStream::count so that it does not try to count beyond max.
1212
(Chris Hegarty)
1313

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

1717
======================= 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
@@ -538,8 +538,8 @@ public void intoBitSet(int upTo, FixedBitSet bitSet, int offset) throws IOExcept
538538
if (disjunction == null) {
539539
if (docsWithField != null) {
540540
// we need to be absolutely sure that the iterator is at least at offset
541-
if (docsWithField.docID() < offset) {
542-
docsWithField.advance(offset);
541+
if (docsWithField.docID() < doc) {
542+
docsWithField.advance(doc);
543543
}
544544
docsWithField.intoBitSet(upTo, bitSet, offset);
545545
doc = docsWithField.docID();

0 commit comments

Comments
 (0)