-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Added filters
aggregation
#6119
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
A multi-bucket aggregation where multiple filters can be defined (each filter defines a bucket). The buckets will collect all the documents that match their associated filter. This aggregation can be very useful when one wants to compare analytics between different criterias. It can also be accomplished using multiple definitions of the single filter aggregation, but here, the user will only need to define the sub-aggregations only once. Closes #6118
@rashidkpc @jpountz fyi |
"filters" : { | ||
"filters" : { | ||
"errors" : { "query" : { "match" : { "body" : "error" } } }, | ||
"warnings" : { "query" : { "match" : { "body" : "error" } } } |
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.
I think the 2nd query should look for warning
in the body
instead of error
?
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.
indeed
I like the way that this aggregation manages buckets (like the range agg). I left a couple of questions inlined. |
Love it, exactly what we needed. |
@uboness what's the status here? I remove the review tag for now... |
I think it's pretty much ready... there's only a debate about the json structur... maybe @clintongormley can have a look |
+1 thanks @uboness |
@uboness I think it should be:
This fits nicely with the
... but I think that's just providing options for the sake of it. |
@clintongormley the idea behind the "keyed" version was to be future proof... it's consistent with other aggs, in the future if we'll need to add meta data to the application (which we actually working on doing in another PR #6465) it'll be mixed with the aggs data... and that's no good |
@uboness PR #6465 will work happily with my example structure. The
The
So the only distinction between these |
@clintongormley actually, you're right... my bad.. will work to see how it works out, thx |
Closing as PR 6974 supersedes this |
A multi-bucket aggregation where multiple filters can be defined (each filter defines a bucket). The buckets will collect all the documents that match their associated filter.
This aggregation can be very useful when one wants to compare analytics between different criterias. It can also be accomplished using multiple definitions of the single filter aggregation, but here, the user will only need to define the sub-aggregations only once.
Closes #6118