Class InternalOrder.CompoundOrder
java.lang.Object
org.elasticsearch.search.aggregations.BucketOrder
org.elasticsearch.search.aggregations.InternalOrder.CompoundOrder
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
- Enclosing class:
- InternalOrder
public static class InternalOrder.CompoundOrder extends BucketOrder
MultiBucketsAggregation.Bucket ordering strategy to sort by multiple criteria.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
-
Method Summary
Modifier and Type Method Description java.util.Comparator<MultiBucketsAggregation.Bucket>comparator(Aggregator aggregator)booleanequals(java.lang.Object obj)inthashCode()java.util.List<BucketOrder>orderElements()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)Methods inherited from class org.elasticsearch.search.aggregations.BucketOrder
aggregation, aggregation, compound, compound, count, key, toString, writeTo
-
Method Details
-
orderElements
- Returns:
- unmodifiable list of
BucketOrders to sort on.
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Throws:
java.io.IOException
-
comparator
- Specified by:
comparatorin classBucketOrder- Returns:
- A comparator for the bucket based on the given aggregator. The comparator is used in two phases:
- aggregation phase, where each shard builds a list of buckets to be sent to the coordinating node. In this phase, the passed in aggregator will be the aggregator that aggregates the buckets on the shard level.
- reduce phase, where the coordinating node gathers all the buckets from all the shards and reduces them to a final bucket list. In this case, the passed in aggregator will be
null.
-
hashCode
public int hashCode()- Specified by:
hashCodein classBucketOrder
-
equals
public boolean equals(java.lang.Object obj)- Specified by:
equalsin classBucketOrder
-