# Possible to run a geohash query based on geo\_shape Point type?

**URL:** <https://discuss.elastic.co/t/possible-to-run-a-geohash-query-based-on-geo-shape-point-type/233375>\
**Category:** Elasticsearch\
**Tags:** maps\
**Created:** [May 19, 2020, 4:42pm UTC](https://discuss.elastic.co/t/possible-to-run-a-geohash-query-based-on-geo-shape-point-type/233375 "2020-05-19T16:42:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![corrigancd](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@corrigancd](https://discuss.elastic.co/u/corrigancd)\
**Post date:** [May 19, 2020, 4:42pm UTC](https://discuss.elastic.co/t/possible-to-run-a-geohash-query-based-on-geo-shape-point-type/233375/1 "2020-05-19T16:42:57Z")

</div>

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](https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html), all is working well:

```auto
    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](https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-shape.html) where all documents are set to POINT, in the above query, i get an exception as a result:

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

```

The [geohash grid aggregation example](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geohashgrid-aggregation.html) 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,  
Edwin

---

<div class="post-metadata">

**Author:** ![Ignacio\_Vera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ignacio_vera/32/36674_2.png) [@Ignacio\_Vera](https://discuss.elastic.co/u/Ignacio_Vera)\
**Post date:** [May 19, 2020, 5:17pm UTC](https://discuss.elastic.co/t/possible-to-run-a-geohash-query-based-on-geo-shape-point-type/233375/2 "2020-05-19T17:17:38Z")

</div>

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:

> <https://github.com/elastic/elasticsearch/issues/37206>
>
> There are several features that we would like to add that require fast retrieval of geo shapes and can greatly benefit...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 16, 2020, 5:17pm UTC](https://discuss.elastic.co/t/possible-to-run-a-geohash-query-based-on-geo-shape-point-type/233375/3 "2020-06-16T17:17:46Z")

</div>

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