Geohash_grid in composite aggregation

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
}

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

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