I'm using a terms
aggregation in Elasticsearch and have a question about the size
parameter. Let's say I set size: 1000
, but in reality, the number of buckets generated is always much lower—around 150 at most.
My question is: Does specifying a larger size
value (like 1000) cause significantly higher memory usage, even if the actual number of buckets created never exceeds 150?
I'm trying to understand whether it's more efficient to set the size closer to the expected bucket count, or if having a higher value has negligible impact when the actual data doesn't require that many buckets.
Thanks in advance!