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
,InternalGeoHashGrid
,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 class
InternalMultiBucketAggregation.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)
protected
InternalMultiBucketAggregation(StreamInput in)
Read from a stream.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static int
countInnerBucket(Aggregation agg)
Counts the number of inner buckets inside the providedAggregation
static int
countInnerBucket(InternalMultiBucketAggregation.InternalBucket bucket)
Counts the number of inner buckets inside the providedInternalMultiBucketAggregation.InternalBucket
abstract A
create(java.util.List<B> buckets)
Create a new copy of thisAggregation
with the same settings as thisAggregation
and contains the provided buckets.abstract B
createBucket(InternalAggregations aggregations, B prototype)
Create a newInternalMultiBucketAggregation.InternalBucket
using the provided prototype bucket and aggregations.abstract java.util.List<? extends InternalMultiBucketAggregation.InternalBucket>
getBuckets()
java.lang.Object
getProperty(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 thisAggregation
with the same settings as thisAggregation
and 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.InternalBucket
using 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:
getBuckets
in interfaceMultiBucketsAggregation
- Returns:
- The buckets of this aggregation.
-
getProperty
public java.lang.Object getProperty(java.util.List<java.lang.String> path)
- Specified by:
getProperty
in 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
-
-