Skip to content

Commit b197894

Browse files
committed
Advance doc instead of offset in competitive iterator (#14530)
1 parent 62d12cf commit b197894

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

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

6262
======================= 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)