Term aggregation size 0

(Michele) #1

Hi, from ES5 now terms aggregation with size 0 are not supported anymore, see here

Sadly I was using it A LOT in kibana dashboard
what's a good practice now?

here it says that a small size may get wrong result

thus I was thinking of setting a large size (i.e. 99999, things that I actually did and worked quite fine)

but i'm currently questioning whether it is a good practice or not, does it have bad performances? what's the trade off?

(Yannick Welsch) #2

Setting size to 0 was dangerous as it could lead to the bucket explosion problem. A good practice should be for users to have a rough idea how many buckets to expect and to specify a reasonable bound for it.

If you worry about imprecisions, have a look at this section:


(Michele) #3

ok, got it, what if I want them all? the solution is to set it large?

(Yannick Welsch) #4

yes, to set it to a number that's large enough :wink:

(Shane Connelly) #5

Most of the time, end users won't look at the 99,999th term in an aggregation. They probably won't look at the 10,000th. Or even the 1,000th. You should consider what people are actually going to look at and use that as a bounds.

(system) #6