- Enclosing class:
MultiBucketsAggregation.Bucketordering strategy to sort by a sub-aggregation.
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalOrder
InternalOrder.Aggregation, InternalOrder.CompoundOrder, InternalOrder.Parser, InternalOrder.Streams
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Method SummaryModifier and TypeMethodDescriptionBuild a comparator for fully built buckets.
hashCode()A builds comparator comparing buckets partially built buckets by delegating comparison of the results of any "child" aggregations to the provided Aggregator.
Methods inherited from class org.elasticsearch.search.aggregations.InternalOrder
isCountDesc, isKeyAsc, isKeyDesc, isKeyOrder
Methods inherited from class org.elasticsearch.search.aggregations.BucketOrder
aggregation, aggregation, compound, compound, count, key, toString, validate, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
pathpublic AggregationPath path()
partiallyBuiltBucketComparatorpublic <T extends MultiBucketsAggregation.Bucket> Comparator<T> partiallyBuiltBucketComparator
(ToLongFunction<T> ordinalReader, Aggregator aggregator)Description copied from class:
BucketOrderA builds comparator comparing buckets partially built buckets by delegating comparison of the results of any "child" aggregations to the provided Aggregator.
Warning: This is fairly difficult to use and impossible to use cleanly. In addition, this exists primarily to return the "top n" buckets based on the results of a sub aggregation. The trouble is that could end up throwing away buckets on the data nodes that should ultimately be kept after reducing all of the results. If you know that this is coming it is fine, but most folks that use "generic" sorts don't. In other words: before you use this method think super duper hard if you want to have these kinds of issues. The terms agg does an folks get into trouble with it all the time.
comparatorDescription copied from class:
BucketOrderBuild a comparator for fully built buckets.
toXContentpublic XContentBuilder toXContent
(XContentBuilder builder, ToXContent.Params params) throws IOException
hashCodepublic int hashCode()
equalspublic boolean equals