Restore WANDScorer for TOP_SCORES + minShouldMatch > 1#16176
Merged
Conversation
romseygeek
approved these changes
Jun 3, 2026
Contributor
romseygeek
left a comment
There was a problem hiding this comment.
Thanks for opening @txwei - all looks great. Do you want to remove the Draft flag?
|
|
||
| Bug Fixes | ||
| --------------------- | ||
| * GITHUB#16176: Restore WANDScroer for TOP_SCORES + minShouldMatch > 1. (Tianxiao Wei) |
Contributor
There was a problem hiding this comment.
Let's move this to the 10.5 section?
Also, small typo: s/WANDScroer/WANDScorer/
Contributor
There was a problem hiding this comment.
Agreed, let's please move this to 10.5. I'm happy to handle the backport.
Contributor
Author
There was a problem hiding this comment.
thanks for pointing out the typo! fixed and moved to 10.5
mccullocht
approved these changes
Jun 3, 2026
Contributor
Author
|
ConstMSM2 got a huge boost from this change (added in mikemccand/luceneutil#583) |
mccullocht
pushed a commit
that referenced
this pull request
Jun 4, 2026
Lucene #13408 (released in 10.0) dropped a guard in BooleanScorerSupplier.optionalBulkScorer that previously kept TOP_SCORES + minShouldMatch > 1 queries on WANDScorer. As a side effect, when matches are dense, dispatch now lands on BooleanScorer, which has no top-K impact pruning — causing 10–100× latency regressions on pure-should compound queries with minimumShouldMatch > 1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Lucene #13408 (released in 10.0) dropped a guard in
BooleanScorerSupplier.optionalBulkScorerthat previously keptTOP_SCORES + minShouldMatch > 1queries onWANDScorer. As a side effect, when matches are dense, dispatch now lands on BooleanScorer, which has no top-K impact pruning — causing 10–100× latency regressions on pure-should compound queries with minimumShouldMatch > 1.