Skip to content

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

Merged
jimczi merged 1 commit intoelastic:7.xfrom
jimczi:composite_sorted_index_backport
Dec 20, 2019
Merged

Optimize composite aggregation based on index sorting (#48399)#50272
jimczi merged 1 commit intoelastic:7.xfrom
jimczi:composite_sorted_index_backport

Conversation

@jimczi
Copy link
Copy Markdown
Contributor

@jimczi jimczi commented Dec 17, 2019

Backport of #48399

Co-authored-by: Daniel Huang <danielhuang@tencent.com>

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
Copy Markdown
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