kkewwei opened a new issue, #16626: URL: https://github.com/apache/lucene/issues/16626
### Description BooleanScorerSupplier#opt` currently selects `WANDScorer` whenever `minShouldMatch > 1`, including score modes that don't require scores: https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/search/BooleanScorerSupplier.java#L580 For these non-scoring modes, `WANDScorer` cannot benefit from block-max score pruning. It returns candidate documents through its approximation and performs the actual minimum-should-match verification in `TwoPhaseIterator.matches()`. Before #10707, query used `MinShouldMatchSumScorer`, whose `nextDoc()` implementation searched internally for a document satisfying `minShouldMatch`. Although the two implementations are similar, this behavior may be more efficient when scores are not required. In our production environment, upgrading lucene make query pattern from `MinShouldMatchSumScorer` to `WANDScorer` caused more CPU consumed. I plan to benchmark `MinShouldMatchSumScorer` and `WANDScorer` with non-scoring query to see the difference. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
