Composite aggregations track_total_hits

Hi all,

For me is not clear what are the differences and when use: track_total_hits, search.max_buckets and size in particular for composite aggregations.
Can someone help?

Thanks in advance

1 Like

Heya @klaus82

track_total_hits only refers to document search hits. It does not change the behavior of a given composite aggregation. Additionally, it does not provide an accurate way to determine how many buckets will be within the composite aggregation.

search.max_buckets is a setting that restricts the maximum number of buckets that can be returned via a multi-bucket aggregation. When it comes to composite aggregations, it is a limit on the size parameter. This prevents too many buckets being gathered in a single composite aggregation "page".

size (in the composite aggregation context) is how many buckets are gathered per "page". This restricts the aggregation to only gather that number of buckets per "page".

Thank you very much @BenTrent. Your explanation is very clear!

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