- All Implemented Interfaces:
An internal implementation of
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
Field SummaryModifier and TypeFieldDescription
Fields inherited from class org.elasticsearch.search.aggregations.Aggregations
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
Method SummaryModifier and TypeMethodDescription
()Make a mutable copy of the aggregation results.
()Deprecated.these only exist for BWC serialization
PipelineAggregator.PipelineTree pipelineTree)(Merge a PipelineAggregator.PipelineTree into this aggregation result tree before serializing to a node older than 7.8.0.
List<InternalAggregations> aggregationsList, InternalAggregation.ReduceContext context, Function<List<InternalAggregation>,InternalAggregations> ctor)(Reduces the given list of aggregations as well as the top-level pipeline aggregators extracted from the first
InternalAggregationsobject found in the list.
doubleGet value to use when sorting by a descendant of the aggregation containing this.Begin the reduction process.
Methods inherited from class org.elasticsearch.search.aggregations.Aggregations
asList, asMap, equals, fromXContent, get, getAsMap, hashCode, iterator, toXContent, toXContentInternal
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
EMPTYpublic static final InternalAggregations EMPTY
InternalAggregationspublic InternalAggregations(List<InternalAggregation> aggregations, Supplier<PipelineAggregator.PipelineTree> pipelineTreeSource)Constructs a node in the aggregation tree.
pipelineTreeSource- must be null inside the tree or after final reduction. Should reference the search request otherwise so we can properly serialize the response to versions of Elasticsearch that require the pipelines to be serialized.
writeToDescription copied from interface:
mergePipelineTreeForBWCSerializationpublic void mergePipelineTreeForBWCSerialization(PipelineAggregator.PipelineTree pipelineTree)Merge a PipelineAggregator.PipelineTree into this aggregation result tree before serializing to a node older than 7.8.0.
copyResultsMake a mutable copy of the aggregation results.
IMPORTANT: The copy doesn't include any pipeline aggregations, if there are any.
getTopLevelPipelineAggregatorsDeprecated.these only exist for BWC serializationGet the top level pipeline aggregators.
sortValuepublic double sortValue(AggregationPath.PathElement head, Iterator<AggregationPath.PathElement> tail)Get value to use when sorting by a descendant of the aggregation containing this.
topLevelReducepublic 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)
reducepublic static InternalAggregations reduce(List<InternalAggregations> aggregationsList, InternalAggregation.ReduceContext context, Function<List<InternalAggregation>,InternalAggregations> ctor)Reduces the given list of aggregations as well as the top-level pipeline aggregators extracted from the first
InternalAggregationsobject found in the list. Note that pipeline aggregations _are not_ reduced by this method. Pipelines are handled separately by
ctor- used to build the
InternalAggregations. The top level reduce specifies a constructor that adds pipeline aggregation information that is used to send pipeline aggregations to older versions of Elasticsearch that require the pipeline aggregations to be returned as part of the aggregation tree
reducepublic static InternalAggregations reduce(List<InternalAggregations> aggregationsList, InternalAggregation.ReduceContext context)