elasticsearch/elasticsearch — pull request #5237 by thanodnl (2014-02-24 13:48:20+00:00)
Title: Changing the sorting for terms aggs,

This pull request fixes the sorting of aggregations as discussed in issue #5236.

It forces the `NaN` values to be pushed to the bottom of the list, no matter if you are sorting asc/desc. This way top lists show the most relevant aggregates in the top. Also it actually does what the comments above it already said it should do.

Closes #5236.