zacharymorn commented on code in PR #1005:
URL: https://github.com/apache/lucene/pull/1005#discussion_r913207313


##########
lucene/core/src/java/org/apache/lucene/search/BlockMaxMaxscoreScorer.java:
##########
@@ -248,6 +251,17 @@ public long cost() {
 
       @Override
       public boolean matches() throws IOException {
+        // Only sum up scores of non-essential scorers, essential scores were 
already folded into
+        // the score.
+        for (int i = 0; i < firstEssentialScorerIndex; ++i) {
+          DisiWrapper w = allScorers[i];
+          if (w.doc < doc) {
+            w.doc = w.iterator.advance(doc);
+          }
+          if (w.doc == doc) {
+            score += allScorers[i].scorer.score();
+          }
+        }
         return score() >= minCompetitiveScore;

Review Comment:
   Nit: maybe just use `score` instead of `score()` here ?



-- 
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