-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fix bug in Filters aggregation and Terms aggregation with Other bucket #40698
Fix bug in Filters aggregation and Terms aggregation with Other bucket #40698
Conversation
Pinging @elastic/kibana-app |
@@ -165,20 +165,16 @@ describe('Terms Agg Other bucket helper', () => { | |||
filters: { | |||
filters: { | |||
'': { | |||
'bool': { |
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.
This is just reformatting
💚 Build Succeeded |
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
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 was too slow!
Summary
The bug is reproduced when you run a Filters aggregation with an empty string in the filter bar, and results in a user-visible toast saying "Can't convert undefined to object". It also threw a console error saying
malformed filter agg params, missing "input" query
:The bug is that the empty string was causing the query DSL not to be generated for the default Filters aggregation. This is related to the Terms aggregation with Other bucket, which uses a Filters aggregation to calculate how many documents are not included in the top terms.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers