Class InternalOrder.Aggregation
java.lang.Object
org.elasticsearch.search.aggregations.BucketOrder
org.elasticsearch.search.aggregations.InternalOrder
org.elasticsearch.search.aggregations.InternalOrder.Aggregation
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentObject
- Enclosing class:
- InternalOrder
MultiBucketsAggregation.Bucket
ordering 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
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Method Summary
Modifier and TypeMethodDescriptionBuild a comparator for fully built buckets.boolean
int
hashCode()
<T extends MultiBucketsAggregation.Bucket>
Comparator<T>partiallyBuiltBucketComparator
(ToLongFunction<T> ordinalReader, Aggregator aggregator) A builds comparator comparing buckets partially built buckets by delegating comparison of the results of any "child" aggregations to the provided Aggregator.path()
toXContent
(XContentBuilder builder, ToXContent.Params params) 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
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Method Details
-
path
-
partiallyBuiltBucketComparator
public <T extends MultiBucketsAggregation.Bucket> Comparator<T> partiallyBuiltBucketComparator(ToLongFunction<T> ordinalReader, Aggregator aggregator) Description copied from class:BucketOrder
A 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.
- Specified by:
partiallyBuiltBucketComparator
in classBucketOrder
-
comparator
Description copied from class:BucketOrder
Build a comparator for fully built buckets.- Specified by:
comparator
in classBucketOrder
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Throws:
IOException
-
hashCode
public int hashCode()- Specified by:
hashCode
in classBucketOrder
-
equals
- Specified by:
equals
in classBucketOrder
-