Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcut query phase using the results of other shards (#51852) #53659

Merged
merged 6 commits into from
Mar 18, 2020

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Mar 17, 2020

Backport of #51852

This commit, built on top of elastic#51708, allows to modify shard search requests based on informations collected on other shards. It is intended to speed up sorted queries on time-based indices. For queries that are only interested in the top documents.

This change will rewrite the shard queries to match none if the bottom sort value computed in prior shards is better than all values in the shard.
For queries that mix top documents and aggregations this change will reset the size of the top documents to 0 instead of rewriting to match none.
This means that we don't need to keep a search context open for this shard since we know in advance that it doesn't contain any competitive hit.
@jimczi jimczi added :Search/Search Search-related issues that do not fall into other categories backport labels Mar 17, 2020
@elasticmachine
Copy link
Collaborator

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

jimczi added a commit to jimczi/elasticsearch that referenced this pull request Mar 17, 2020
This change adapts the serialization checks to 7.7.0 in order to cope with elastic#53659.
Note that this commit also disables the bwc tests temporarily in order to be able to
merge elastic#53659 first.

Relates elastic#51852
jimczi added a commit that referenced this pull request Mar 18, 2020
This change adapts the serialization checks to 7.7.0 in order to cope with #53659.
Note that this commit also disables the bwc tests temporarily in order to be able to
merge #53659 first.

Relates #51852
@jimczi jimczi merged commit 8e17322 into elastic:7.x Mar 18, 2020
@jimczi jimczi deleted the distributed_time_sort_backport branch March 18, 2020 16:20
@jimczi jimczi mentioned this pull request Mar 18, 2020
jimczi added a commit that referenced this pull request Mar 18, 2020
This change restores the bwc tests now that #53659 is merged.
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.

None yet

2 participants