Closed colings86 closed 9 years ago
@nknize are you able to take a look at this?
Thanks for reporting this, there appears to be a legit bug in Lucene-Spatial's IntersectsPrefixTreeFilter. Will take a look and get a patch out ASAP.
I did one more test - checking if right/left hand rule impact this. After indexing following geometries both of them showed in results for that query
{"coordinates":[[[-87.6544,41.9677],[-87.6544,41.9717],[-87.6489,41.9717],[-87.6489,41.9677],[-87.6544,41.9677]]],"type":"Polygon"}
{"coordinates":[[[-87.6544,41.9677],[-87.6489,41.9677],[-87.6489,41.9717],[-87.6544,41.9717],[-87.6544,41.9677]]],"type":"Polygon"}
See the gist at [1] for a visual example of the polygons involved and a script to reproduce the bug. The bug occurs when you index a document containing two simple polygons and then query for shape which intersect a polygon representing a ring around (but not touching) the two indexed shapes. The query returns the document when it shouldn't since neither of the shapes interact with the ring.
Changing the
relation
option to eitherwithin
ordisjoint
produce no results from the query.[1] https://gist.github.com/colings86/0a0184ba79c5367685ff
This bug was raised from the following mailing list post: https://groups.google.com/forum/#!topic/elasticsearch/TlqaVu91R7A