public class MultiBucketConsumerService
extends java.lang.Object
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.Modifier and Type | Class | Description |
---|---|---|
static class |
MultiBucketConsumerService.MultiBucketConsumer |
An
IntConsumer that throws a MultiBucketConsumerService.TooManyBucketsException
when the sum of the provided values is above the limit (`search.max_buckets`). |
static class |
MultiBucketConsumerService.TooManyBucketsException |
Modifier and Type | Field | Description |
---|---|---|
static int |
DEFAULT_LIMIT_MAX_BUCKETS |
|
static Setting<java.lang.Integer> |
MAX_BUCKET_SETTING |
|
static int |
SOFT_LIMIT_MAX_BUCKETS |
Constructor | Description |
---|---|
MultiBucketConsumerService(ClusterService clusterService,
Settings settings) |
Modifier and Type | Method | Description |
---|---|---|
MultiBucketConsumerService.MultiBucketConsumer |
create() |
public static final int DEFAULT_LIMIT_MAX_BUCKETS
public static final int SOFT_LIMIT_MAX_BUCKETS
public static final Setting<java.lang.Integer> MAX_BUCKET_SETTING
public MultiBucketConsumerService(ClusterService clusterService, Settings settings)
public MultiBucketConsumerService.MultiBucketConsumer create()