Skip to content

Conversation

@jtibshirani
Copy link
Contributor

Backport of #55271, opening to get a full build.

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.
@jtibshirani jtibshirani added :Search/Search Search-related issues that do not fall into other categories backport labels Apr 16, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@jtibshirani jtibshirani merged commit 9c2865b into elastic:7.x Apr 16, 2020
@jtibshirani jtibshirani deleted the rewrite-script-score branch April 16, 2020 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport :Search/Search Search-related issues that do not fall into other categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants