Sorting of Terms aggregation buckets on Rollup indices


(Jiří Bednář) #1

Greetings

I am trying to use the Terms aggregation on a rollup index, and I want the resulting buckets to be sorted, so that I can select the top 5 ones.
Using raw data, everything looks as expected:

However, if I use a rollup index, the buckets are sorted by the key, not by the value:

Is there a way to adjust this behaviour?


(CJ Cenizal) #2

Thanks for reporting this! This is functionality we haven't implemented yet, so I've created an issue to track it: https://github.com/elastic/kibana/issues/26372.