Rewrite wrapper queries to match_none if possible.#55271
Merged
jtibshirani merged 1 commit intoelastic:masterfrom Apr 16, 2020
Merged
Rewrite wrapper queries to match_none if possible.#55271jtibshirani merged 1 commit intoelastic:masterfrom
jtibshirani merged 1 commit intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-search (:Search/Search) |
d3c3ec3 to
c53f1a1
Compare
Queries like script_score wrap a query and modify its score. If the inner query rewrites to match_none, then the entire query can rewrite to match_none. This lets us detect that certain shards can be skipped during the 'can match' phase. This was a simple change that seemed like it would help in some cases. But it will likely not have a huge impact, since in many use cases where the 'can match' phase is helpful, the search is not sorted by score.
a336df3 to
4bbdda1
Compare
Contributor
Author
|
Thanks for the review. |
This was referenced Apr 16, 2020
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.
Queries like script_score wrap a query and modify its score. If the inner query
rewrites to match_none, then the entire query can rewrite to match_none. This
lets us detect that certain shards can be skipped during the 'can match' phase.
This was a simple change that seemed like it would help in some cases. But it
will likely not have a huge impact, since in many use cases where the 'can
match' phase is helpful, the search is not sorted by score.