jpountz commented on code in PR #14739:
URL: https://github.com/apache/lucene/pull/14739#discussion_r2119453329


##########
lucene/core/src/java/org/apache/lucene/search/BlockMaxConjunctionBulkScorer.java:
##########
@@ -87,18 +87,64 @@ public int score(LeafCollector collector, Bits acceptDocs, 
int min, int max) thr
       // NOTE: windowMax is inclusive
       int windowMax = Math.min(scorers[0].advanceShallow(windowMin), max - 1);
 
-      float maxWindowScore = Float.POSITIVE_INFINITY;
       if (0 < scorable.minCompetitiveScore) {
-        maxWindowScore = computeMaxScore(windowMin, windowMax);
+        float maxWindowScore = computeMaxScore(windowMin, windowMax);
+        scoreWindowScoreFirst(collector, acceptDocs, windowMin, windowMax + 1, 
maxWindowScore);
+      } else {
+        scoreWindowDocFirst(collector, acceptDocs, windowMin, windowMax + 1);

Review Comment:
   I believe we've always had this problem? I remember trying to make things 
better but it didn't look great or caused performance regressions with term 
queries, the case I care about the most.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to