Possible to run a geohash query based on geo_shape Point type?

Hello Elasticsearch,

I would like to get some clarification on the possibilities to use a geo_shape point type for a geohash aggregation query?

When I use the location field, i.e. a geo_point field type, all is working well:

    GET company/_search
        "query": {"match_all": {}},
        "aggs": {
          "filtered_geohash": {
            "geohash_grid": {
              "field": "location",
              "precision": 2
      "size": 0

When I use a geo_shape field type where all documents are set to POINT, in the above query, i get an exception as a result:

        "type": "illegal_argument_exception",
        "reason": "Fielddata is not supported on field [geometry] of type [geo_shape]"

The geohash grid aggregation example uses a geo_point field. But would like to get clarification on whether it is possible to use geo_shape type for geohash grid aggregations?

Best Regards,

It is currently not possible to run aggregations on geo_shape fields but it is very likely that this will be possible in the next release:

1 Like

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