Module org.elasticsearch.server
Class MultiBucketConsumerService
java.lang.Object
org.elasticsearch.search.aggregations.MultiBucketConsumerService
An aggregation service that creates instances of
MultiBucketConsumerService.MultiBucketConsumer.
The consumer is used by BucketsAggregator and InternalMultiBucketAggregation to limit the number of buckets created
in Aggregator.buildAggregations(org.elasticsearch.common.util.LongArray) and InternalAggregation.getReducer(AggregationReduceContext, int).
The limit can be set by changing the `search.max_buckets` cluster setting and defaults to 65536.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAnIntConsumerthat throws aMultiBucketConsumerService.TooManyBucketsExceptionwhen the sum of the provided values is above the limit (`search.max_buckets`).static class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionMultiBucketConsumerService(ClusterService clusterService, Settings settings, CircuitBreaker breaker) -
Method Summary
-
Field Details
-
DEFAULT_MAX_BUCKETS
public static final int DEFAULT_MAX_BUCKETS- See Also:
-
MAX_BUCKET_SETTING
-
-
Constructor Details
-
MultiBucketConsumerService
public MultiBucketConsumerService(ClusterService clusterService, Settings settings, CircuitBreaker breaker)
-
-
Method Details
-
createForFinal
-
createForPartial
-
getLimit
public int getLimit()
-