Skip to content

Fix bug in Filters aggregation and Terms aggregation with Other bucket#40698

Merged
wylieconlon merged 1 commit intoelastic:masterfrom
wylieconlon:fix-terms-other-bucket
Jul 10, 2019
Merged

Fix bug in Filters aggregation and Terms aggregation with Other bucket#40698
wylieconlon merged 1 commit intoelastic:masterfrom
wylieconlon:fix-terms-other-bucket

Conversation

@wylieconlon
Copy link
Copy Markdown
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 Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// Feature:KQL KQL Feature:Vis Editor Visualization editor issues labels Jul 9, 2019
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-app

filters: {
filters: {
'': {
'bool': {
Copy link
Copy Markdown
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
Copy Markdown
Contributor

💚 Build Succeeded

Copy link
Copy Markdown
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
Copy Markdown
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 Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.2.1 v7.3.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants