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

[Maps] update geospatial filters to use geo_shape query for geo_point fields #62966

Merged
merged 3 commits into from
Apr 13, 2020

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Apr 8, 2020

fixes #48462 and #45521

Elasticsearch 7.7 added geo_point support for geo_shape query. This PR updates spatial filters to use geo_shape query instead of geo_bounding_box and geo_polygon for geo_point fields.

geo_shape queries provide the following benefits:

  1. geo_shape queries support pre-index shapes so the geoemtry does not need to be included in the filter. This will resolve URL overflow problems.
  2. geo_shape query syntax is the same for geo_point and geo_shape fields. This is a huge benefit for multi-indices use cases. As long as the geometry field is consistent across indices, then a single filter can now be used to filter all geospatial data, regardless of whether its a geo_point or geo_shape. Before this change, the filter syntax would fail for either geo_point or geo_shape since the query syntax could not be used on both.

@nreese nreese added release_note:enhancement [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v7.8.0 labels Apr 8, 2020
@nreese nreese requested a review from a team as a code owner April 8, 2020 15:59
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@nreese
Copy link
Contributor Author

nreese commented Apr 13, 2020

@elasticmachine merge upstream

@nreese
Copy link
Contributor Author

nreese commented Apr 13, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

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

nice addition

@thomasneirynck
Copy link
Contributor

created #63388 to track issue. There are so many ways to breaks this now (e.g missing field-names, mismatched data-types when using disjoint/within, ...)

@nreese nreese merged commit 301b795 into elastic:master Apr 13, 2020
nreese added a commit to nreese/kibana that referenced this pull request Apr 13, 2020
… fields (elastic#62966)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 14, 2020
* master: (132 commits)
  document code splitting for client code (elastic#62593)
  Escape single quotes surrounded by double quotes (elastic#63229)
  [Endpoint] Update cli mapping to match endpoint package (elastic#63372)
  update in-app links to metricbeat configuration docs (elastic#63295)
  investigation notes field (documentation / metadata) (elastic#63386)
  [Maps] fix bug where toggling Scaling type does not re-fetch data (elastic#63326)
  [Alerting] set correct parameter for unauthented email action (elastic#63086)
  [Telemetry] force staging urls in tests (elastic#63356)
  Migrate legacy maps service to NP & update refs (elastic#60942)
  Fix task manager query to return tasks to retry (elastic#63360)
  [Endpoint] Policy list support for URL pagination state (elastic#63291)
  [Canvas] Migrate saved object mappings and migrations to Kibana Platform (elastic#58891)
  [DOCS] Add ILM tutorial (elastic#59502)
  [Maps] Add SOURCE_TYPES enumeration (elastic#62975)
  [Maps] update geospatial filters to use geo_shape query for geo_point fields (elastic#62966)
  Move away from npStart for embeddables in canvas (elastic#62680)
  Use MapInput type from Maps plugin (elastic#61539)
  Update to pagination for workpad and templates (elastic#62050)
  [SIEM] Fix AlertsTable id (elastic#63368)
  Consistent terminology around cypress test data (elastic#63279)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 14, 2020
* master:
  document code splitting for client code (elastic#62593)
  Escape single quotes surrounded by double quotes (elastic#63229)
  [Endpoint] Update cli mapping to match endpoint package (elastic#63372)
  update in-app links to metricbeat configuration docs (elastic#63295)
  investigation notes field (documentation / metadata) (elastic#63386)
  [Maps] fix bug where toggling Scaling type does not re-fetch data (elastic#63326)
  [Alerting] set correct parameter for unauthented email action (elastic#63086)
  [Telemetry] force staging urls in tests (elastic#63356)
  Migrate legacy maps service to NP & update refs (elastic#60942)
  Fix task manager query to return tasks to retry (elastic#63360)
  [Endpoint] Policy list support for URL pagination state (elastic#63291)
  [Canvas] Migrate saved object mappings and migrations to Kibana Platform (elastic#58891)
  [DOCS] Add ILM tutorial (elastic#59502)
  [Maps] Add SOURCE_TYPES enumeration (elastic#62975)
  [Maps] update geospatial filters to use geo_shape query for geo_point fields (elastic#62966)
  Move away from npStart for embeddables in canvas (elastic#62680)
nreese added a commit that referenced this pull request Apr 14, 2020
… fields (#62966) (#63394)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
wayneseymour pushed a commit that referenced this pull request Apr 15, 2020
… fields (#62966)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@jomach
Copy link

jomach commented May 18, 2020

Hi, one question. I have a Map with two layers. the first layer it has the type geo_point and the second layer I have a type geo_shape. I get the error: field [location] is not a geo_point field

Can it be that we have a small bug there? That all layers need to have the same type? Testing the layers separate dashboards works fine.

@nreese
Copy link
Contributor Author

nreese commented May 18, 2020

@jomach
Which version of Kibana are you using?
Are your geo_point and geo_shape fields coming from different index patterns?
Are your geo_point and geo_shape both stored in a field named location?

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.

[Maps] query error on document layer index missing filtered shape field
5 participants