# Geohash\_grid aggregation in opensearch

**URL:** <https://discuss.elastic.co/t/geohash-grid-aggregation-in-opensearch/327553>\
**Category:** Elasticsearch\
**Created:** [March 13, 2023, 1:09pm UTC](https://discuss.elastic.co/t/geohash-grid-aggregation-in-opensearch/327553 "2023-03-13T13:09:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hmkhitaryan](https://avatars.discourse-cdn.com/v4/letter/h/cdc98d/32.png) [@hmkhitaryan](https://discuss.elastic.co/u/hmkhitaryan)\
**Post date:** [March 13, 2023, 1:09pm UTC](https://discuss.elastic.co/t/geohash-grid-aggregation-in-opensearch/327553/1 "2023-03-13T13:09:42Z")

</div>

Hi.  
I'm gettin this error when trying "geohash\_grid" aggregation in java opensearch api. Seems opensearch doesn't have geohash\_grid aggregation type, So what can be the analog?

```auto
"aggs": {
    "filter_agg": {
      "filter": {
        "geo_bounding_box": {
          "ignore_unmapped": true,
          "location": {
            "top_left": {
              "lat": 90,
              "lon": -180
            },
            "bottom_right": {
              "lat": -90,
              "lon": 180
            }
          }
        }
      },
      "aggs": {
        "2": {
          "geohash_grid": {
            "field": "location",
            "precision": 2
          },
          "aggs": {
            "3": {
              "geo_centroid": {
                "field": "location"
              }
            }
          }
        }
      }
    }
  },

```

So when trying this query, I'm getting this error:

```auto
"Unknown aggregation type [geohash_grid]"

```

---

<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:** [March 13, 2023, 1:09pm UTC](https://discuss.elastic.co/t/geohash-grid-aggregation-in-opensearch/327553/2 "2023-03-13T13:09:42Z")

</div>

OpenSearch/OpenDistro are AWS run products and differ from the original Elasticsearch and Kibana products that Elastic builds and maintains. You may need to contact them directly for further assistance.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [March 13, 2023, 2:41pm UTC](https://discuss.elastic.co/t/geohash-grid-aggregation-in-opensearch/327553/3 "2023-03-13T14:41:35Z")

</div>

> [@hmkhitaryan](#):
>
> I'm gettin this error when trying "geohash\_grid" aggregation in java opensearch api.

Hello,

Opensearch is a different tool as it includes changes made by AWS, it is not supported here, you need to check with an Opensearch community forum.

---

<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:** [April 10, 2023, 2:42pm UTC](https://discuss.elastic.co/t/geohash-grid-aggregation-in-opensearch/327553/4 "2023-04-10T14:42:20Z")

</div>

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