Enable non-match queries in custom filters#8049
Closed
Bargs wants to merge 1 commit intoelastic:masterfrom
Closed
Conversation
filterManager.add assumes that if it finds a filter that has a query prop, then it must also have a match clause contained in that query. User created custom filters may use term queries, range queries and the like. Once you've added any filters without a match clause like that, you can no longer add new filters by clicking the "add filter" icon next to a field in the results. Instead you'll get an error that says "Cannot read property '<your-prop>' of undefined" when filterManager.add iterates over your custom filter with no match key. Fixes: elastic#7246 Related: elastic#8038
Member
|
LGTM |
1 similar comment
Contributor
|
LGTM |
Contributor
|
@Bargs What's the status of this? Good to go? |
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.
filterManager.add assumes that if it finds a filter that has a query
prop, then it must also have a match clause contained in that query.
User created custom filters may use term queries, range queries and
the like. Once you've added any filters without a match clause like
that, you can no longer add new filters by clicking the "add filter" icon
next to a field in the results. Instead you'll get an error that says
"Cannot read property '' of undefined" when filterManager.add
iterates over your custom filter with no match key.
Fixes: #7246