-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Allow nested fields in the composite aggregation #37178
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
Conversation
This changes adds the support to handle `nested` fields in the `composite` aggregation. A `nested` aggregation can be used as parent of a `composite` aggregation in order to target `nested` fields in the `sources`. Closes elastic#28611
|
Pinging @elastic/es-analytics-geo |
polyfractal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, sorry for the delay!
| if (parent != null) { | ||
| throw new IllegalArgumentException("[composite] aggregation cannot be used with a parent aggregation"); | ||
| AggregatorFactory<?> invalid = checkParentIsNullOrNested(parent); | ||
| if (invalid != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, what scenario might trigger this now that nested is supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you add a parent other than a nested aggregator. So for instance a terms aggregation cannot use a composite aggregation as a sub-aggregation.
This changes adds the support to handle `nested` fields in the `composite` aggregation. A `nested` aggregation can be used as parent of a `composite` aggregation in order to target `nested` fields in the `sources`. Closes #28611
|
why can't it support all kinds of aggregators as parent ? |
|
Starting on which version is this feature available? |
This changes adds the support to handle
nestedfields in thecompositeaggregation. A
nestedaggregation can be used as parent of acompositeaggregation in order to target
nestedfields in thesources.Closes #28611