Deprecate ascending sort for terms aggregations#8167
Conversation
Elasticsearch is deprecating the ability to use ascending sort for terms aggregations, so we render a deprecation notice whenever a user views a visualization that uses a terms aggregation with ascending sort by count. We only render this error message once per route so it does not spam the users constantly when they have things like auto-refresh enabled on a dashboard.
|
@epixa I just re-read the Elasticsearch issue that triggered this PR (and the ones for 4.6): elastic/elasticsearch#17614. My current (possibly incorrect) interpretation of the discussion in that issue is that Elasticsearch isn't going to deprecate this capability for future removal, but is going to leave it in and add warnings in documentation and such about its inaccuracy. If this is your understanding as well, should the warning in Kibana be updated accordingly? |
|
It doesn't look like a final decision has been made yet, but since we've already shipped this deprecation in 4.6, I want to make sure it is at least in master as well. We can always tweak or remove it entirely if such a decision is made on the ES side of things. |
|
Yeah, fair point. We'll have more 5.x releases so we'll have the opportunity to amend things when a final decision is made in ES-land. Thanks. This PR LGTM! |
|
@tbragin You should see that whenever there's a fresh page load that includes that visualization rather than only when it's first created. This way a user wouldn't constantly be spammed with the notice if they're navigating around Kibana, but if they were to do a page refresh or close their browser and come back later or something, they'd see it again. |
|
Great! Yeah, i see that now. Thanks for the clarification. |
Deprecate ascending sort for terms aggregations Former-commit-id: 7a1745c
|
@PhaedrusTheGreek There's no way to disable it, but if ES isn't going to proceed with its removal, then we should remove the deprecation notice in Kibana. Once I get confirmation that it will stick around for awhile in ES, we can proceed with removing it (the notice) in Kibana. |
|
@epixa Did this warning ever get backed out? I'm hitting this issue again with another dashboard. |
|
@PhaedrusTheGreek It wasn't backed out, sorry about that. I created #23409 to track that so it doesn't get lost. |

Elasticsearch is deprecating the ability to use ascending sort for terms
aggregations, so we render a deprecation notice whenever a user views a
visualization that uses a terms aggregation with ascending sort by
count. We only render this error message once per route so it does not
spam the users constantly when they have things like auto-refresh
enabled on a dashboard.
Closes #8059