Skip to content

Comments

Enable non-match queries in custom filters#8049

Closed
Bargs wants to merge 1 commit intoelastic:masterfrom
Bargs:nonMatchFilterForRealz
Closed

Enable non-match queries in custom filters#8049
Bargs wants to merge 1 commit intoelastic:masterfrom
Bargs:nonMatchFilterForRealz

Conversation

@Bargs
Copy link
Contributor

@Bargs Bargs commented Aug 22, 2016

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

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
@tsullivan
Copy link
Member

LGTM

1 similar comment
@ppisljar
Copy link
Contributor

ppisljar commented Sep 2, 2016

LGTM

@epixa
Copy link
Contributor

epixa commented Oct 8, 2016

@Bargs What's the status of this? Good to go?

@Bargs Bargs closed this Oct 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants