How do I find the length of geo hash elasticsearch is using to store geoshapes in my ES index?
Elasticsearch version - 6.1.2
I have been seeing some really bad false positives detected by elasticsearch intersects geo query when polygons(~36MB) are really big.
There is no easy way to get that information as it is encoded in the index.
I guess you are using the default parameters for geo_shape field which means that you are using the default value for
distance_error_pct which is set to 0.025. What this parameter does effectively is adjust the value of the precision for the shape in respect to the length of the geoshape's bounding box diagonal. So this is expected and for big shapes (covering a big area) the precision can be in the order of several kilometres.
You can try to set the value of the parameter to 0 but if shapes are big, it will take quite a long time to index, quite a lot of space and in the worst case you might run out of heap. This is the reason from version 6.6 a new indexing strategy has been introduced which provides a precision of around 1cm regardless of the size of your shape.
If possible, I would recommend trying this out, unfortunately you will need to reindex your documents.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.