Class AggregatorFactory
org.elasticsearch.search.aggregations.AggregatorFactory
- Direct Known Subclasses:
AdjacencyMatrixAggregatorFactory
,FilterAggregatorFactory
,FiltersAggregatorFactory
,GlobalAggregatorFactory
,MultiValuesSourceAggregatorFactory
,NestedAggregatorFactory
,ReverseNestedAggregatorFactory
,SamplerAggregatorFactory
,SignificantTextAggregatorFactory
,ValuesSourceAggregatorFactory
public abstract class AggregatorFactory
extends
-
Field Summary
Modifier and TypeFieldDescriptionprotected AggregationContext
protected AggregatorFactories
protected <,>
protected
protected AggregatorFactory
-
Constructor Summary
ConstructorDescriptionname, AggregationContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, <,> 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, <,> metadata)
void
Returns the aggregation subtype for nodes usage stats.name()
Methods inherited from class java.lang.
, , , , , , , , , ,
-
Field Details
-
name
protected final name -
parent
-
factories
-
metadata
protected final <,> metadata -
context
-
-
Constructor Details
-
AggregatorFactory
public AggregatorFactory( name, AggregationContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, <,> metadata) throwsConstructs a new aggregator factory.- Parameters:
name
- The aggregation name- Throws:
- if an error occurs creating the factory
-
-
Method Details
-
name
public name() -
doValidate
public void doValidate() -
createInternal
protected abstract Aggregator createInternal(Aggregator parent, CardinalityUpperBound cardinality, <,> metadata) throws- Throws:
-
create
Creates 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:
-
getParent
-
getStatsSubtype
public 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.
-