Aggregation Response

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:



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

Elasticsearch 7.0 is 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: )

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

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