# Geohash\_grid in composite aggregation

**URL:** <https://discuss.elastic.co/t/geohash-grid-in-composite-aggregation/174193>\
**Category:** Elasticsearch\
**Created:** [March 27, 2019, 7:54pm UTC](https://discuss.elastic.co/t/geohash-grid-in-composite-aggregation/174193 "2019-03-27T19:54:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sushmamagesh](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sushmamagesh](https://discuss.elastic.co/u/sushmamagesh)\
**Post date:** [March 27, 2019, 7:54pm UTC](https://discuss.elastic.co/t/geohash-grid-in-composite-aggregation/174193/1 "2019-03-27T19:54:13Z")

</div>

Hi

Is it possible to use geohash grid as part of a composite aggregation?

Getting error -  
"type": "x\_content\_parse\_exception",  
"reason": "[7:38] [composite] failed to parse field [sources]"  
and  
"type": "parsing\_exception",  
"reason": "invalid source type: geohash\_grid",

Below my query:

```
GET /index_name/_search?
{
  "aggs" : {
    "my_buckets": {
      "composite" : {
        "sources" : [
          { "res": { "terms": {"field": "field1.keyword"} } },
          { "geo": { "geohash_grid" : {"field" : "geoip.location","precision" : 3 } } }
        ]
      }
    }
  },
    "query": {
      "bool": {
        "must": [
          {"range": {"@timestamp": { "gte": "now-2d/d", "lte": "now-1d/d" } } }
        ]
      }
    },
  "size": 0
}
```

---

<div class="post-metadata">

**Author:** ![BenTrent](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bentrent/32/33915_2.png) [@BenTrent](https://discuss.elastic.co/u/BenTrent)\
**Post date:** [March 28, 2019, 12:29am UTC](https://discuss.elastic.co/t/geohash-grid-in-composite-aggregation/174193/2 "2019-03-28T00:29:00Z")

</div>

`geohash_grid` is currently not supported in `composite` aggregations. Though, it does sound like a good feature to have.

I created an github issue for this feature request: [https://github.com/elastic/elasticsearch/issues/40568](https://github.com/elastic/elasticsearch/issues/40568)

---

<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 25, 2019, 12:29am UTC](https://discuss.elastic.co/t/geohash-grid-in-composite-aggregation/174193/3 "2019-04-25T00:29:07Z")

</div>

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