Skip to content

Simplify ordering support on terms aggregations #17588

Closed
@jpountz

Description

@jpountz

We try to be as flexible as possible when it comes to sorting terms aggregations. However, sorting by anything but by _term or descending _count makes it very hard to return the correct top buckets and counts, which is disappointing to users. Instead, I suggest that we only allow order options that result in
reasonably accurate results:

  • remove the ability to sort by ascending count
  • remove ordering by sub aggregations entirely, or only allow when the leaf of the path is a min or max aggregation: in that case counts will not be accurate but I believe that the top buckets will be correct.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions