jpountz commented on a change in pull request #2141: URL: https://github.com/apache/lucene-solr/pull/2141#discussion_r555074892
########## File path: lucene/core/src/java/org/apache/lucene/search/Boolean2ScorerSupplier.java ########## @@ -230,10 +232,13 @@ private Scorer opt( for (ScorerSupplier scorer : optional) { optionalScorers.add(scorer.get(leadCost)); } - if (minShouldMatch > 1) { + + if (scoreMode == ScoreMode.TOP_SCORES) { + return new WANDScorer(weight, optionalScorers, minShouldMatch); + } else if (minShouldMatch > 1) { + // nocommit minShouldMath > 1 && scoreMode != ScoreMode.TOP_SCORES still requires MinShouldMatchSumScorer. + // Do we want to deprecate this entirely now ? Review comment: > Is there a reason WANDScorer is only used for TOP_DOCS before? Mostly because it's a bit slower since it needs to track two priority queues and one linked list, when the simple DisjunctionScorer only needs to track a single priority queue. > since WANDScorer can already handle the case where minShouldMatch == 0, then I can see MinShouldMatchSumScorer be merged into WANDScorer mostly to handle non-scoring mode +1 to give it a try in a follow-up PR! ---------------------------------------------------------------- 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