OpenSearch/server
Nik Everett 407101c39b
Clean and document sorting with partialy built buckets (backport of #52769) (#52925)
The `terms` aggregation can be sortd by the results of its
sub-aggregations. Because it uses that sorting for filtering to the
top-n it tries not to construct all of the buckets for the child
aggregations. This has its own interesting problem around reduction, but
they aren't super relevant to this change. This change moves that
optimization from the `TermsAggregator` and into the aggregators being
sorted on. This should make it more clear what is going on and it
unifies this optimization with validating the sort.

Finally, this should enable some minor optimizations to save a few
comparisons when sorting multi-valued buckets. I'll get those in a
follow up because they are now *fairly* obvious. They probably won't be
a huge performance improvement, but it'll be nice anyway.
2020-02-27 17:50:55 -05:00
..
licenses Upgrade Lucene to 8.5.0-snapshot-b01d7cb (#52584) 2020-02-21 10:25:03 +00:00
src Clean and document sorting with partialy built buckets (backport of #52769) (#52925) 2020-02-27 17:50:55 -05:00
build.gradle Upgrade to lucene-8.5.0-snapshot-3333ce7da6d (#51749) 2020-01-31 11:20:15 -05:00