Class InternalAggregations
java.lang.Object
org.elasticsearch.search.aggregations.Aggregations
org.elasticsearch.search.aggregations.InternalAggregations
- All Implemented Interfaces:
Iterable<Aggregation>,Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentFragment
An internal implementation of
Aggregations.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from class org.elasticsearch.search.aggregations.Aggregations
aggregations, AGGREGATIONS_FIELDFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Method Summary
Modifier and TypeMethodDescriptionMake a mutable copy of the aggregation results.static InternalAggregationsfrom(List<InternalAggregation> aggregations) static InternalAggregationsreadFrom(StreamInput in) static InternalAggregationsreduce(List<InternalAggregations> aggregationsList, InternalAggregation.ReduceContext context) Reduces the given list of aggregations as well as the top-level pipeline aggregators extracted from the firstInternalAggregationsobject found in the list.doubleGet value to use when sorting by a descendant of the aggregation containing this.static InternalAggregationstopLevelReduce(List<InternalAggregations> aggregationsList, InternalAggregation.ReduceContext context) Begin the reduction process.voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.search.aggregations.Aggregations
asList, asMap, equals, fromXContent, get, getAsMap, hashCode, iterator, toXContent, toXContentInternalMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
EMPTY
-
-
Method Details
-
from
-
readFrom
- Throws:
IOException
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
copyResults
Make a mutable copy of the aggregation results. -
sortValue
public double sortValue(AggregationPath.PathElement head, Iterator<AggregationPath.PathElement> tail) Get value to use when sorting by a descendant of the aggregation containing this. -
topLevelReduce
public static InternalAggregations topLevelReduce(List<InternalAggregations> aggregationsList, InternalAggregation.ReduceContext context) Begin the reduction process. This should be the entry point for the "first" reduction, e.g. called by SearchPhaseController or anywhere else that wants to initiate a reduction. It _should not_ be called as an intermediate reduction step (e.g. in the middle of an aggregation tree). This method first reduces the aggregations, and if it is the final reduce, then reduce the pipeline aggregations (both embedded parent/sibling as well as top-level sibling pipelines) -
reduce
public static InternalAggregations reduce(List<InternalAggregations> aggregationsList, InternalAggregation.ReduceContext context) Reduces the given list of aggregations as well as the top-level pipeline aggregators extracted from the firstInternalAggregationsobject found in the list. Note that pipeline aggregations _are not_ reduced by this method. Pipelines are handled separately bytopLevelReduce(List, ReduceContext)
-