Precision issue with Elasticsearch 6.8

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?

Could you share the mapping you are using?

{
  "bigpolygons": {
    "mappings": {
      "bigpolygon": {
        "properties": {
          "geometry": {
            "type": "geo_shape"
          },
          "id": {
            "type": "keyword"
          },
          "type": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          }
        }
      }
    }
  }
}

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

Please help

Hi,

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.

Thanks for the reply. May I know when does the ES starts support of circles in geo queries in 6.8?

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.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.