Class MultiBucketConsumerService
java.lang.Object
org.elasticsearch.search.aggregations.MultiBucketConsumerService
public class MultiBucketConsumerService
extends java.lang.Object
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.buildAggregation(long) and InternalAggregation.reduce(java.util.List<org.elasticsearch.search.aggregations.InternalAggregation>, org.elasticsearch.search.aggregations.InternalAggregation.ReduceContext).
The limit can be set by changing the `search.max_buckets` cluster setting and defaults to 10000.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMultiBucketConsumerService.MultiBucketConsumerAnIntConsumerthat throws aMultiBucketConsumerService.TooManyBucketsExceptionwhen the sum of the provided values is above the limit (`search.max_buckets`).static classMultiBucketConsumerService.TooManyBucketsException -
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MAX_BUCKETSstatic Setting<java.lang.Integer>MAX_BUCKET_SETTING -
Constructor Summary
Constructors Constructor Description MultiBucketConsumerService(ClusterService clusterService, Settings settings) -
Method Summary
Modifier and Type Method Description MultiBucketConsumerService.MultiBucketConsumercreate()
-
Field Details
-
DEFAULT_MAX_BUCKETS
public static final int DEFAULT_MAX_BUCKETS- See Also:
- Constant Field Values
-
MAX_BUCKET_SETTING
-
-
Constructor Details
-
Method Details