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

Optimize composite aggregation based on index sorting (#48399) #50272

Merged
merged 1 commit into from
Dec 20, 2019

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Dec 17, 2019

Backport of #48399

Co-authored-by: Daniel Huang <[email protected]>

This is a spinoff of elastic#48130 that generalizes the proposal to allow early termination with the composite aggregation when leading sources match a prefix or the entire index sort specification.
In such case the composite aggregation can use the index sort natural order to early terminate the collection when it reaches a composite key that is greater than the bottom of the queue.
The optimization is also applicable when a query other than match_all is provided. However the optimization is deactivated for sources that match the index sort in the following cases:
  * Multi-valued source, in such case early termination is not possible.
  * missing_bucket is set to true
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (:Analytics/Aggregations)

jimczi added a commit to jimczi/elasticsearch that referenced this pull request Dec 19, 2019
This commit adapts the version checks of the InternalComposite
serialization after the backport of elastic#50272.
Note that this pr disables bwc tests since elastic#50272 is not merged yet.
jimczi added a commit that referenced this pull request Dec 20, 2019
This commit adapts the version checks of the InternalComposite
serialization after the backport of #50272.
Note that this pr disables bwc tests since #50272 is not merged yet.
@jimczi jimczi merged commit 2acafd4 into elastic:7.x Dec 20, 2019
@jimczi jimczi deleted the composite_sorted_index_backport branch December 20, 2019 11:32
jimczi added a commit to jimczi/elasticsearch that referenced this pull request Dec 20, 2019
@jimczi jimczi mentioned this pull request Dec 20, 2019
jimczi added a commit that referenced this pull request Dec 20, 2019
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this pull request Jan 23, 2020
This commit adapts the version checks of the InternalComposite
serialization after the backport of elastic#50272.
Note that this pr disables bwc tests since elastic#50272 is not merged yet.
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this pull request Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants