Sorting of Terms aggregation buckets on Rollup indices

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?

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.

1 Like

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