Class AggregatorFactory
java.lang.Object
org.elasticsearch.search.aggregations.AggregatorFactory
- Direct Known Subclasses:
AdjacencyMatrixAggregatorFactory
,FilterAggregatorFactory
,FiltersAggregatorFactory
,GlobalAggregatorFactory
,MultiValuesSourceAggregatorFactory
,NestedAggregatorFactory
,ReverseNestedAggregatorFactory
,SamplerAggregatorFactory
,SignificantTextAggregatorFactory
,ValuesSourceAggregatorFactory
-
Field Summary
Modifier and TypeFieldDescriptionprotected AggregationContext
protected AggregatorFactories
protected String
protected AggregatorFactory
-
Constructor Summary
ConstructorDescriptionAggregatorFactory(String name, AggregationContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String,Object> metadata)
Constructs a new aggregator factory. -
Method Summary
Modifier and TypeMethodDescriptioncreate(Aggregator parent, CardinalityUpperBound cardinality)
Creates the aggregator.protected abstract Aggregator
createInternal(Aggregator parent, CardinalityUpperBound cardinality, Map<String,Object> metadata)
void
Returns the aggregation subtype for nodes usage stats.name()
-
Field Details
-
name
-
parent
-
factories
-
metadata
-
context
-
-
Constructor Details
-
AggregatorFactory
public AggregatorFactory(String name, AggregationContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String,Object> metadata) throws IOExceptionConstructs a new aggregator factory.- Parameters:
name
- The aggregation name- Throws:
IOException
- if an error occurs creating the factory
-
-
Method Details
-
name
-
doValidate
public void doValidate() -
createInternal
protected abstract Aggregator createInternal(Aggregator parent, CardinalityUpperBound cardinality, Map<String,Object> metadata) throws IOException- Throws:
IOException
-
create
public final Aggregator create(Aggregator parent, CardinalityUpperBound cardinality) throws IOExceptionCreates the aggregator.- Parameters:
parent
- The parent aggregator (if this is a top level factory, the parent will benull
)cardinality
- Upper bound of the number ofowningBucketOrd
s that theAggregator
created by this method will be asked to collect.- Throws:
IOException
-
getParent
-
getStatsSubtype
Returns the aggregation subtype for nodes usage stats.It should match the types registered by calling AggregationUsageService. In other words, it should be ValueSourcesType for the VST aggregations OTHER_SUBTYPE for all other aggregations.
-