Deprecated size:0 on terms aggregation

According to Elastic docs, size: 0 on terms aggregation will be deprecated. Please see https://www.elastic.co/guide/en/elasticsearch/reference/5.0/breaking_50_aggregations_changes.html#_literal_size_0_literal_on_terms_significant_terms_and_geohash_grid_aggregations

In the prior versions of Elasticsearch, size of 0 results in size being set to Integer.MAX_VALUE. It seems to return all the buckets. How can I achieve the functionality of size: 0 in Elasticsearch 5.x?

How can I achieve the functionality of size: 0

Set it to a big number - it should make you pause for thought and consider the memory overheads involved in doing this.

1 Like

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