zacharymorn commented on a change in pull request #2205: URL: https://github.com/apache/lucene-solr/pull/2205#discussion_r559223900
########## File path: lucene/core/src/java/org/apache/lucene/search/Boolean2ScorerSupplier.java ########## @@ -231,10 +231,27 @@ private Scorer opt( optionalScorers.add(scorer.get(leadCost)); } - if (scoreMode == ScoreMode.TOP_SCORES) { - return new WANDScorer(weight, optionalScorers, minShouldMatch); - } else if (minShouldMatch > 1) { - return new MinShouldMatchSumScorer(weight, optionalScorers, minShouldMatch); + // nocommit + // + // The following updated condition follows the previous one that also utilized + // MinShouldMatchSumScorer However, technically speaking, WANDScorer is also able to + // handle the case where minShouldMatch == 0 (proven with existing possible condition of + // scoreMode == SoreMode.TOP_SCORES && minShouldMatch == 0), but removing the + // minShouldMatch > 1 condition would also stop WANDScorer to handle the case + // where scoreMode.needsScore() == false, which WANDScorer is also capable of + // (proven with existing possible condition of scoreMode != ScoreMode.TOP_SCORES && + // minShouldMatch > 1). + // + // Ultimately, WANDScorer should be able to handle the following conditions now: + // 1. Any ScoreMode (with scoring or not), although it might be a bit slower compared to + // DisjunctionSumScorer due to data structures and algorithms usd + // 2. Any minCompetitiveScore ( >= 0 ) + // 3. Any minShouldMatch ( >= 0 ) + // + // So it seems we might need a different condition check to differentiate usage between + // WANDScorer and DisjunctionSumScorer ? Review comment: Updated the comment 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. 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