Per the solution provided in this comment, we have upgraded our elasticsearch version to 6.8. However, the precision issue still exists. We also tried deleting the index and ingested the data in a new index . It didn't work.
Should we set any parameters to get a precision of 1cm as mentioned in the aforementioned comment?
That should do it, so I am not sure what is going on.
You need to reindex the data so it is get indexed in the new format. You should notice that indexing geoshapes is much faster than before and your index size should be reduced as well.
Do you have an example of a polygon and a query that is given a false positive?
I've deleted the index and re-ingested the data again. I can confirm that the precision issue is not present anymore. Not sure why it didn't work when I re-ingested data for the first time.
However, I am getting "CIRCLE geometry is not supported" error when I am trying to run geoshape query against circles. I am not running into this issue if I perform geo query against polygons.
Doesn't elasticsearch support circles in geo queries anymore?
We can't upgrade to 6.8 if we don't have support for circles. So, we are left to choose between solving precision issue vs continuing support for circles
I am afraid that currently if you need to execute queries that require a circle then you need to either use prefix trees, and therefore you have the issue with precision or transform the circle into a polygon and execute the query as a polygon query.
We do not disclose information about releases but what I can say is that we do not normally back port new features to released version of Elasticsearch. I would presume that circle support will start in one of the 7.x releases.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.