# Aggregation Response

**URL:** <https://discuss.elastic.co/t/aggregation-response/303126>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [April 25, 2022, 7:57am UTC](https://discuss.elastic.co/t/aggregation-response/303126 "2022-04-25T07:57:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpv](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpv/32/102951_2.png) [@jpv](https://discuss.elastic.co/u/jpv)\
**Post date:** [April 25, 2022, 7:57am UTC](https://discuss.elastic.co/t/aggregation-response/303126/1 "2022-04-25T07:57:03Z")

</div>

I recently migrated to Elasticsearch 7.0 and currently using RestHighLevelClient. I noticed my search response, specifically the aggregation response has some added prefixes on the aggregation name ( **filters#**. **sterm** , **min** , **max**.

This is an example:

```auto
  "aggregations":{
    "filters#aggregation_ids_custom":{
      "buckets":{
        "_none_":{
          "doc_count":0
        }
      }
    },
    "sterms#aggregation_ids":{
      "doc_count_error_upper_bound":0,
      "sum_other_doc_count":0,
      "buckets":[

      ]
    }
  }

```

Is there something that I need to se in the SearchRequest or RestHighLevelClient class?

---

<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, 2022, 7:57am UTC](https://discuss.elastic.co/t/aggregation-response/303126/2 "2022-04-25T07:57:03Z")

</div>

Elasticsearch 7.0 is [EOL](https://www.elastic.co/support/eol) and no longer supported. Please upgrade ASAP.

(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:** ![swallez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swallez/32/11972_2.png) [@swallez](https://discuss.elastic.co/u/swallez)\
**Post date:** [April 25, 2022, 1:55pm UTC](https://discuss.elastic.co/t/aggregation-response/303126/3 "2022-04-25T13:55:08Z")

</div>

The additional `filters` or `sterms` are the type of aggregation results, that depend on the type of aggregation defined in the request.

By default Elasticsearch will just return the aggregation name. However `RestHighLevelClient` needs to know the result type to deserialize it and adds the `typed_keys=true` parameter to search requests to this effect.

So you don't have anything to do as `RestHighLevelClient` automatically adds this request parameter.

See [Aggregations | Elasticsearch Guide [7.17] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/search-aggregations.html#return-agg-type)

---

<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:** [May 23, 2022, 1:56pm UTC](https://discuss.elastic.co/t/aggregation-response/303126/4 "2022-05-23T13:56:00Z")

</div>

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