Renaming key & doc_count in bucket aggregations

In a bucket aggregations i get the following result result, is it possible rename the result labels..??

Example key renamed in LABEL and doc_count renamed in VALUE.

{
  "took": 4,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "failed": 0
  },
  "hits": {
    "total": 26022,
    "max_score": 0,
    "hits": []
  },
  "aggregations": {
    "mio": {
      "doc_count_error_upper_bound": 0,
      "sum_other_doc_count": 0,
      "buckets": [
        {
          "key": "CITROEN",
          "doc_count": 23854
        },
        {
          "key": "BMW",
          "doc_count": 2120
        },
        {
          "key": "AUDI",
          "doc_count": 32
        }
      ]
    }
  }
}

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