-
Notifications
You must be signed in to change notification settings - Fork 25.2k
7.6.0 composite aggregation on index-sorting fields: out-of-bounds exception #52480
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
Comments
Pinging @elastic/es-analytics-geo (:Analytics/Aggregations) |
Followed the steps and it's reproducable on current |
Any news regarding this? It's a very unfortunate deal breaker... |
When an composite aggregation is run against an index with a sort that *starts* with the "source" fields from the composite but has additional fields it'd blow up in while trying to decide if it could use the sort. This changes it to decide that it *can* use the sort. Closes elastic#52480
Thanks for the ping @itizir! I'm just coming up to speed on composite aggs and hadn't seen this. |
Thanks for the quick fix! |
When an composite aggregation is run against an index with a sort that *starts* with the "source" fields from the composite but has additional fields it'd blow up in while trying to decide if it could use the sort. This changes it to decide that it *can* use the sort. Closes #52480
When an composite aggregation is run against an index with a sort that *starts* with the "source" fields from the composite but has additional fields it'd blow up in while trying to decide if it could use the sort. This changes it to decide that it *can* use the sort. Closes elastic#52480
When an composite aggregation is run against an index with a sort that *starts* with the "source" fields from the composite but has additional fields it'd blow up in while trying to decide if it could use the sort. This changes it to decide that it *can* use the sort. Closes #52480
Hello folks ! Do you have any alternative that we can set in the query (while waiting for the next version) ? Thanks ! |
I believe you should be able to replace the direct reference to the field with a script that just reads the value of the field. When you pass a script we can't enable the optimization that was broken here because we can't be sure that your script won't jumble the order of the terms. So a script should "escape" from the bug. |
Thanks @nik9000 , will try it out ! |
Elasticsearch version (
bin/elasticsearch --version
): 7.6.0Description of the problem including expected versus actual behavior:
Was trying to test the optimisation #48399 released in ES 7.6.0, and encountered this bug.
It's failing here https://github.com/elastic/elasticsearch/blob/v7.6.0/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/CompositeAggregator.java#L206
when the aggregation buckets are a subset of the fields on which the index is sorted.
Steps to reproduce:
Minimal example highlighting the problem:
Results in failure
Provide logs (if relevant):
The text was updated successfully, but these errors were encountered: