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

[GEO] False positive match using geo_shape #10583

Closed
nedcampion opened this issue Apr 13, 2015 · 2 comments · Fixed by #10652
Closed

[GEO] False positive match using geo_shape #10583

nedcampion opened this issue Apr 13, 2015 · 2 comments · Fixed by #10652
Assignees
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes

Comments

@nedcampion
Copy link

Hi Elasticsearch Team,

I wanted to surface an issue regarding a geo query that seems to be giving me a false positive result. I have a gist here that can be used to recreate what I am seeing

I am testing against 1.5.1. In short I create an index with a geo_shape field with the maximum precision, I then index a document containing a polygon that describes the boundary of Mexico and I then query against that index using an envelope that describes a small area in the southern tip of Texas. The query returns the document containing Mexico which is a false positive match.

I realize that geo_shape does not provide 100% accuracy depending on how it is configured but the region I am querying with seems many miles away from the Mexico border and the precision is set to 1m. Is this a bug or am I missing something.

@nedcampion nedcampion changed the title [GEO] False positive match using geo_shape [GEO] False positive match using geo_shape Apr 14, 2015
@clintongormley clintongormley added discuss :Analytics/Geo Indexing, search aggregations of geo points and shapes labels Apr 14, 2015
@clintongormley
Copy link

@nknize please could you take a look

@nknize
Copy link
Contributor

nknize commented Apr 14, 2015

This is related to #9691 (and similar #9860) a fix will be in place very very shortly.

tl;dr: if you really want full precision you need to lower the distance_error_pct value. Be careful, you can quickly blow out memory.

In the meantime, if you want to get accurate results and preserve the most memory your best bet is to post-filter the results in the application layer (resultShape.relate(candidateShape))

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants