[Maps] set filter.meta.key to geoFieldName so query passes filterMatchesIndex when ignoreFilterIfFieldNotInIndex is true#56692
Merged
nreese merged 5 commits intoelastic:masterfrom Feb 10, 2020
Conversation
Contributor
|
Pinging @elastic/kibana-gis (Team:Geo) |
thomasneirynck
approved these changes
Feb 3, 2020
Contributor
thomasneirynck
left a comment
There was a problem hiding this comment.
lgtm from Maps side
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
Author
|
@elasticmachine merge upstream |
lizozom
approved these changes
Feb 9, 2020
Contributor
lizozom
left a comment
There was a problem hiding this comment.
Haven't pulled down, but change to pass in the key looks ok to me
Contributor
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
nreese
added a commit
to nreese/kibana
that referenced
this pull request
Feb 10, 2020
…hesIndex when ignoreFilterIfFieldNotInIndex is true (elastic#56692) * [Maps] set filter.meta.key to geoFieldName so query passes filterMatchesIndex * remove unused variable Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
nreese
added a commit
to nreese/kibana
that referenced
this pull request
Feb 10, 2020
…hesIndex when ignoreFilterIfFieldNotInIndex is true (elastic#56692) * [Maps] set filter.meta.key to geoFieldName so query passes filterMatchesIndex * remove unused variable Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
nreese
added a commit
that referenced
this pull request
Feb 10, 2020
…hesIndex when ignoreFilterIfFieldNotInIndex is true (#56692) (#57249) * [Maps] set filter.meta.key to geoFieldName so query passes filterMatchesIndex * remove unused variable Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Feb 11, 2020
* master: (34 commits) [Index management] Server-side NP ready (elastic#56829) Webhook action - make user and password secrets optional (elastic#56823) [DOCS] Removes reference to IRC (elastic#57245) [Monitoring] NP migration: Local angular module (elastic#51823) [SIEM] Adds ECS link to help menu (elastic#57104) Ensure http interceptors are shares across lifecycle methods (elastic#57150) [Remote clusters] Migrate server code out of legacy (elastic#56781) fixes render bug in alert list (elastic#57152) siem 7.6 updates (elastic#57169) Make the update alert API key API work when AAD is out of sync (elastic#56640) fix(NA): MaxListenersExceededWarning on getLoggerStream (elastic#57133) [Metrics UI] Setup commonly used time ranges in timepicker (elastic#56701) [Maps] set filter.meta.key to geoFieldName so query passes filterMatchesIndex when ignoreFilterIfFieldNotInIndex is true (elastic#56692) Create plugin mock for event log plugin (elastic#57048) fix ts error on master (elastic#57236) Don't create API key for disabled alerts when calling create API (elastic#57041) Fix enable and disable API to still work when AAD is out of sync (elastic#56634) [DOCS] Canvas embed objects (elastic#57156) Delete autocomplete namespace (elastic#57187) Security - Inject logout url (elastic#57201) ...
nreese
added a commit
that referenced
this pull request
Feb 12, 2020
…hesIndex when ignoreFilterIfFieldNotInIndex is true (#56692) (#57250) * [Maps] set filter.meta.key to geoFieldName so query passes filterMatchesIndex * remove unused variable Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
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.
Fixes #56651
When
ignoreFilterIfFieldNotInIndexis true, queries are removed from the search if the index does not contain the field, https://github.com/elastic/kibana/blob/master/src/plugins/data/common/es_query/es_query/filter_matches_index.ts.The filtering logic looks for
filter.meta.keyto equal one of the field names in the index. The problem was that spatial filters created by the maps application was not setting key to be the geoFieldName. Instead, key was getting set to the top level property likegeo_bounding_boxorgeo_polygonorgeo_shape. This PR updates the creation of the spatial filter so that key is set to the geo field name so the mapper does not have to pull it out of the filter where the geoFieldName context has been lost.