Skip to content

Apache Lucene open-source search software

Revert "Utilize `docIdRunEnd` on `ReqExclBulkScorer` (#14806)"

Dawid Weiss973183258d1e
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index e625456a70c..f37370b886b 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -214,8 +214,6 @@ Optimizations
* GITHUB#14896: Vectorize filterCompetitiveHits (Ge Song, Adrien Grand)
-* GITHUB#14806: Utilize docIdRunEnd on ReqExclBulkScorer. (Ge Song)
-
Changes in Runtime Behavior
---------------------
* GITHUB#14823: Decrease TieredMergePolicy's default number of segments per
diff --git a/lucene/core/src/java/org/apache/lucene/search/ReqExclBulkScorer.java b/lucene/core/src/java/org/apache/lucene/search/ReqExclBulkScorer.java
index 0d5c927ea14..7c07ef0386d 100644
--- a/lucene/core/src/java/org/apache/lucene/search/ReqExclBulkScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/ReqExclBulkScorer.java
@@ -57,10 +57,7 @@ final class ReqExclBulkScorer extends BulkScorer {
exclDoc = exclApproximation.advance(upTo);
}
if (exclDoc == upTo) {
- if (exclTwoPhase == null) {
- // from upTo to docIdRunEnd() are excluded, so we scored up to docIdRunEnd()
- upTo = exclApproximation.docIDRunEnd();
- } else if (exclTwoPhase.matches()) {
+ if (exclTwoPhase == null || exclTwoPhase.matches()) {
// upTo is excluded so we can consider that we scored up to upTo+1
upTo += 1;
}