Skip to content

Commit 500efeb

Browse files
authored
Utilize docIdRunEnd on ReqExclBulkScorer (#14806)
1 parent 251e7df commit 500efeb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lucene/CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ Optimizations
214214

215215
* GITHUB#14896: Vectorize filterCompetitiveHits (Ge Song, Adrien Grand)
216216

217+
* GITHUB#14806: Utilize docIdRunEnd on ReqExclBulkScorer. (Ge Song)
218+
217219
Changes in Runtime Behavior
218220
---------------------
219221
* GITHUB#14823: Decrease TieredMergePolicy's default number of segments per

lucene/core/src/java/org/apache/lucene/search/ReqExclBulkScorer.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ public int score(LeafCollector collector, Bits acceptDocs, int min, int max) thr
5757
exclDoc = exclApproximation.advance(upTo);
5858
}
5959
if (exclDoc == upTo) {
60-
if (exclTwoPhase == null || exclTwoPhase.matches()) {
60+
if (exclTwoPhase == null) {
61+
// from upTo to docIdRunEnd() are excluded, so we scored up to docIdRunEnd()
62+
upTo = exclApproximation.docIDRunEnd();
63+
} else if (exclTwoPhase.matches()) {
6164
// upTo is excluded so we can consider that we scored up to upTo+1
6265
upTo += 1;
6366
}

0 commit comments

Comments
 (0)