Class InternalMultiBucketAggregation<A extends InternalMultiBucketAggregation,B extends InternalMultiBucketAggregation.InternalBucket>
- java.lang.Object
-
- org.elasticsearch.search.aggregations.InternalAggregation
-
- org.elasticsearch.search.aggregations.InternalMultiBucketAggregation<A,B>
-
- All Implemented Interfaces:
NamedWriteable,Writeable,ToXContent,ToXContentFragment,Aggregation,MultiBucketsAggregation
- Direct Known Subclasses:
InternalAdjacencyMatrix,InternalAutoDateHistogram,InternalBinaryRange,InternalComposite,InternalDateHistogram,InternalFilters,InternalGeoGrid,InternalHistogram,InternalRange,InternalSignificantTerms,InternalTerms
public abstract class InternalMultiBucketAggregation<A extends InternalMultiBucketAggregation,B extends InternalMultiBucketAggregation.InternalBucket> extends InternalAggregation implements MultiBucketsAggregation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInternalMultiBucketAggregation.InternalBucket-
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalAggregation
InternalAggregation.ReduceContext
-
Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation
Aggregation.CommonFields
-
Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation
MultiBucketsAggregation.Bucket
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.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 class org.elasticsearch.search.aggregations.InternalAggregation
metaData, name
-
Fields inherited from interface org.elasticsearch.search.aggregations.Aggregation
TYPED_KEYS_DELIMITER
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Modifier Constructor Description InternalMultiBucketAggregation(java.lang.String name, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData)protectedInternalMultiBucketAggregation(StreamInput in)Read from a stream.
-
Method Summary
Modifier and Type Method Description static intcountInnerBucket(Aggregation agg)Counts the number of inner buckets inside the providedAggregationstatic intcountInnerBucket(InternalMultiBucketAggregation.InternalBucket bucket)Counts the number of inner buckets inside the providedInternalMultiBucketAggregation.InternalBucketabstract Acreate(java.util.List<B> buckets)Create a new copy of thisAggregationwith the same settings as thisAggregationand contains the provided buckets.abstract BcreateBucket(InternalAggregations aggregations, B prototype)Create a newInternalMultiBucketAggregation.InternalBucketusing the provided prototype bucket and aggregations.abstract java.util.List<? extends InternalMultiBucketAggregation.InternalBucket>getBuckets()java.lang.ObjectgetProperty(java.util.List<java.lang.String> path)-
Methods inherited from class org.elasticsearch.search.aggregations.InternalAggregation
doEquals, doHashCode, doReduce, doWriteTo, doXContentBody, equals, getMetaData, getName, getProperty, getType, hashCode, isMapped, pipelineAggregators, readSize, reduce, toString, toXContent, writeSize, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.search.aggregations.Aggregation
getMetaData, getName, getType
-
Methods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableName
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
toXContent
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Constructor Detail
-
InternalMultiBucketAggregation
public InternalMultiBucketAggregation(java.lang.String name, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData)
-
InternalMultiBucketAggregation
protected InternalMultiBucketAggregation(StreamInput in) throws java.io.IOException
Read from a stream.- Throws:
java.io.IOException
-
-
Method Detail
-
create
public abstract A create(java.util.List<B> buckets)
Create a new copy of thisAggregationwith the same settings as thisAggregationand contains the provided buckets.- Parameters:
buckets- the buckets to use in the newAggregation- Returns:
- the new
Aggregation
-
createBucket
public abstract B createBucket(InternalAggregations aggregations, B prototype)
Create a newInternalMultiBucketAggregation.InternalBucketusing the provided prototype bucket and aggregations.- Parameters:
aggregations- the aggregations for the new bucketprototype- the bucket to use as a prototype- Returns:
- the new bucket
-
getBuckets
public abstract java.util.List<? extends InternalMultiBucketAggregation.InternalBucket> getBuckets()
- Specified by:
getBucketsin interfaceMultiBucketsAggregation- Returns:
- The buckets of this aggregation.
-
getProperty
public java.lang.Object getProperty(java.util.List<java.lang.String> path)
- Specified by:
getPropertyin classInternalAggregation
-
countInnerBucket
public static int countInnerBucket(InternalMultiBucketAggregation.InternalBucket bucket)
Counts the number of inner buckets inside the providedInternalMultiBucketAggregation.InternalBucket
-
countInnerBucket
public static int countInnerBucket(Aggregation agg)
Counts the number of inner buckets inside the providedAggregation
-
-