Module org.elasticsearch.server
Class InternalComposite
java.lang.Object
org.elasticsearch.search.aggregations.InternalAggregation
org.elasticsearch.search.aggregations.InternalMultiBucketAggregation<InternalComposite,InternalComposite.InternalBucket>
org.elasticsearch.search.aggregations.bucket.composite.InternalComposite
- All Implemented Interfaces:
NamedWriteable,Writeable,Aggregation,CompositeAggregation,MultiBucketsAggregation,ToXContent,ToXContentFragment
public class InternalComposite
extends InternalMultiBucketAggregation<InternalComposite,InternalComposite.InternalBucket>
implements CompositeAggregation
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation
InternalMultiBucketAggregation.BucketAggregationList<B extends MultiBucketsAggregation.Bucket>, InternalMultiBucketAggregation.InternalBucketWritableNested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation
Aggregation.CommonFieldsNested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.bucket.composite.CompositeAggregation
CompositeAggregation.BucketNested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation
MultiBucketsAggregation.BucketNested classes/interfaces inherited from interface org.elasticsearch.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
Fields inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation
REPORT_EMPTY_EVERYFields inherited from class org.elasticsearch.search.aggregations.InternalAggregation
metadata, nameFields inherited from interface org.elasticsearch.search.aggregations.Aggregation
TYPED_KEYS_DELIMITERFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionafterKey()Returns the last key in this aggregation.create(List<InternalComposite.InternalBucket> newBuckets) Create a new copy of thisAggregationwith the same settings as thisAggregationand contains the provided buckets.createBucket(InternalAggregations aggregations, InternalComposite.InternalBucket prototype) Create a newInternalMultiBucketAggregation.InternalBucketusing the provided prototype bucket and aggregations.protected voiddoWriteTo(StreamOutput out) doXContentBody(XContentBuilder builder, ToXContent.Params params) booleanfinalizeSampling(SamplingContext samplingContext) Called by the parent sampling context.protected AggregatorReducergetLeaderReducer(AggregationReduceContext reduceContext, int size) Return an object that Reduces several aggregations to a single one.intgetSize()Returns the name of the writeable objectinthashCode()Methods inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation
copyWithRewritenBuckets, countInnerBucket, countInnerBucket, forEachBucket, getProperty, mustReduceOnSingleInternalAgg, reducePipelinesMethods inherited from class org.elasticsearch.search.aggregations.InternalAggregation
canLeadReduction, getMetadata, getName, getProperty, getReducer, getType, readSize, sortValue, sortValue, toString, toXContent, writeSize, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.search.aggregations.Aggregation
getMetadata, getName, getTypeMethods inherited from interface org.elasticsearch.xcontent.ToXContent
toXContentMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
InternalComposite
- Throws:
IOException
-
-
Method Details
-
doWriteTo
- Specified by:
doWriteToin classInternalAggregation- Throws:
IOException
-
doXContentBody
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
doXContentBodyin classInternalAggregation- Throws:
IOException
-
getWriteableName
Description copied from interface:NamedWriteableReturns the name of the writeable object- Specified by:
getWriteableNamein interfaceNamedWriteable
-
create
Description copied from class:InternalMultiBucketAggregationCreate a new copy of thisAggregationwith the same settings as thisAggregationand contains the provided buckets.- Specified by:
createin classInternalMultiBucketAggregation<InternalComposite,InternalComposite.InternalBucket> - Parameters:
newBuckets- the buckets to use in the newAggregation- Returns:
- the new
Aggregation
-
createBucket
public InternalComposite.InternalBucket createBucket(InternalAggregations aggregations, InternalComposite.InternalBucket prototype) Description copied from class:InternalMultiBucketAggregationCreate a newInternalMultiBucketAggregation.InternalBucketusing the provided prototype bucket and aggregations.- Specified by:
createBucketin classInternalMultiBucketAggregation<InternalComposite,InternalComposite.InternalBucket> - Parameters:
aggregations- the aggregations for the new bucketprototype- the bucket to use as a prototype- Returns:
- the new bucket
-
getSize
public int getSize() -
getBuckets
- Specified by:
getBucketsin interfaceCompositeAggregation- Specified by:
getBucketsin interfaceMultiBucketsAggregation- Specified by:
getBucketsin classInternalMultiBucketAggregation<InternalComposite,InternalComposite.InternalBucket> - Returns:
- The buckets of this aggregation.
-
afterKey
Description copied from interface:CompositeAggregationReturns the last key in this aggregation. It can be used to retrieve the buckets that are after these values. SeeCompositeAggregationBuilder.aggregateAfter(java.util.Map<java.lang.String, java.lang.Object>).- Specified by:
afterKeyin interfaceCompositeAggregation
-
getLeaderReducer
Description copied from class:InternalAggregationReturn an object that Reduces several aggregations to a single one. This method is called whenInternalAggregation.canLeadReduction()returns true and expects an reducer that produces the right result.- Specified by:
getLeaderReducerin classInternalAggregation
-
finalizeSampling
Description copied from class:InternalAggregationCalled by the parent sampling context. Should only ever be called once as some aggregations scale their internal values- Overrides:
finalizeSamplingin classInternalAggregation- Parameters:
samplingContext- the current sampling context- Returns:
- new aggregation with the sampling context applied, could be the same aggregation instance if nothing needs to be done
-
equals
- Overrides:
equalsin classInternalAggregation
-
hashCode
public int hashCode()- Overrides:
hashCodein classInternalAggregation
-