zacharymorn commented on a change in pull request #2205: URL: https://github.com/apache/lucene-solr/pull/2205#discussion_r559224756
########## File path: lucene/core/src/java/org/apache/lucene/search/WANDScorer.java ########## @@ -319,7 +356,10 @@ private void pushBackLeads(int target) throws IOException { } } lead = null; - leadMaxScore = 0; + + if (needsScore) { + leadMaxScore = 0; + } Review comment: In the latest commit, I've done some refactoring and removed a few newly added branches that can be no-op for non-scoring mode, but not by a lot. Currently there are about 5 conditional branches left for handling non-scoring cases (checking `scoreMode == ScoreMode.TOP_SCORES`), 1 is used in constructor, 2 used in assertions, and the last 2 were used in `advance` and `doNextCompetitiveCandidate`, so I felt that might be the minimal number of branches we could have now without major refactoring changes? What do you think? ---------------------------------------------------------------- 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. 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