Skip to content
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

Merged
merged 1 commit into from
Jul 10, 2019

Conversation

wylieconlon
Copy link
Contributor

@wylieconlon wylieconlon commented Jul 9, 2019

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:

Screenshot 2019-07-09 18 05 45

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 strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@wylieconlon wylieconlon added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:KQL KQL Feature:Vis Editor Visualization editor issues labels Jul 9, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@@ -165,20 +165,16 @@ describe('Terms Agg Other bucket helper', () => {
filters: {
filters: {
'': {
'bool': {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just reformatting

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@Bargs Bargs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@TinaHeiligers TinaHeiligers left a 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:KQL KQL Feature:Vis Editor Visualization editor issues release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.2.1 v7.3.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants