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

Add support for distance queries on geo_shape queries #53466

Merged
merged 5 commits into from
Mar 19, 2020

Conversation

iverase
Copy link
Contributor

@iverase iverase commented Mar 12, 2020

With the upgrade to Lucene 8.5, LatLonShape field has support for distance queries. This change implements this new feature and removes the limitation.

In addition the strategy for building queries is changed as Lucene adds a new interface method called LatLonShape.newGeometryQuery that takes an array of Lucene geometries. This allows the query engine to build the most efficient query for the given parameters. For example an intersect query with a geometry collection currently creates one query per geometry. With this change, the engine can build just one query with all geometries.

fixes #39237
closes #13351

@iverase iverase added >feature :Analytics/Geo Indexing, search aggregations of geo points and shapes v8.0.0 v7.7.0 labels Mar 12, 2020
@iverase iverase requested a review from imotov March 12, 2020 09:56
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (:Analytics/Geo)

@iverase iverase requested a review from nknize March 12, 2020 09:56
Copy link
Contributor

@nknize nknize left a comment

Choose a reason for hiding this comment

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

I like the cleanup. Simple and easy to follow. Thx @iverase

@jpountz jpountz mentioned this pull request Mar 17, 2020
22 tasks
@iverase
Copy link
Contributor Author

iverase commented Mar 19, 2020

@elasticmachine run elasticsearch-ci/packaging-sample-matrix-unix

@iverase iverase merged commit 6eb698b into elastic:master Mar 19, 2020
@iverase iverase deleted the GeoShapeCircle branch March 19, 2020 13:36
iverase added a commit that referenced this pull request Mar 19, 2020
With the upgrade to Lucene 8.5, LatLonShape field has support for distance queries. This change implements this new feature and removes the limitation.
russcam added a commit to elastic/elasticsearch-net that referenced this pull request Apr 16, 2020
Relates: elastic/elasticsearch#53466, elastic/elasticsearch#52564
elastic/elasticsearch#53466, elastic/elasticsearch#52133

This commit updates the Skip versions on circle and multipoint
geoshape queries, to allow them to run for versions 7.7.0+.

Update documentation to indicate that 7.7.0+ is required when
geo shapes are indexed using BKD trees
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >feature v7.7.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

geo_shape queries no longer accept circle in 6.6.0 Distance from [lon,lat] to geo_shape
4 participants