public abstract class ValuesSourceAggregatorFactory<VS extends ValuesSource> extends AggregatorFactory
Modifier and Type | Class and Description |
---|---|
static class |
ValuesSourceAggregatorFactory.LeafOnly<VS extends ValuesSource> |
Modifier and Type | Field and Description |
---|---|
protected ValuesSourceConfig<VS> |
config |
factories, name, parent, type
Modifier | Constructor and Description |
---|---|
protected |
ValuesSourceAggregatorFactory(String name,
String type,
ValuesSourceConfig<VS> config) |
Modifier and Type | Method and Description |
---|---|
Aggregator |
create(AggregationContext context,
Aggregator parent,
long expectedBucketsCount)
Creates the aggregator
|
protected abstract Aggregator |
create(VS valuesSource,
long expectedBucketsCount,
AggregationContext aggregationContext,
Aggregator parent) |
protected abstract Aggregator |
createUnmapped(AggregationContext aggregationContext,
Aggregator parent) |
void |
doValidate() |
parent, subFactories, validate
protected ValuesSourceConfig<VS extends ValuesSource> config
protected ValuesSourceAggregatorFactory(String name, String type, ValuesSourceConfig<VS> config)
public Aggregator create(AggregationContext context, Aggregator parent, long expectedBucketsCount)
AggregatorFactory
create
in class AggregatorFactory
context
- The aggregation contextparent
- The parent aggregator (if this is a top level factory, the parent will be null
)expectedBucketsCount
- If this is a sub-factory of another factory, this will indicate the number of bucket the parent aggregator
may generate (this is an estimation only). For top level factories, this will always be 0public void doValidate()
doValidate
in class AggregatorFactory
protected abstract Aggregator createUnmapped(AggregationContext aggregationContext, Aggregator parent)
protected abstract Aggregator create(VS valuesSource, long expectedBucketsCount, AggregationContext aggregationContext, Aggregator parent)
Copyright © 2009–2015. All rights reserved.