Allow nested fields in the composite aggregation#37178
Merged
jimczi merged 5 commits intoelastic:masterfrom Jan 25, 2019
Merged
Allow nested fields in the composite aggregation#37178jimczi merged 5 commits intoelastic:masterfrom
jimczi merged 5 commits intoelastic:masterfrom
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
Collaborator
|
Pinging @elastic/es-analytics-geo |
polyfractal
approved these changes
Jan 24, 2019
Contributor
polyfractal
left a comment
There was a problem hiding this comment.
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) { |
Contributor
There was a problem hiding this comment.
Out of curiosity, what scenario might trigger this now that nested is supported?
Contributor
Author
There was a problem hiding this comment.
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.
jimczi
added a commit
that referenced
this pull request
Jan 25, 2019
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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