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 Details

  • Constructor Details

    • AggregatorFactory

      public AggregatorFactory( name, AggregationContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, <,​> metadata) throws
      Constructs 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

      public final Aggregator create(Aggregator parent, CardinalityUpperBound cardinality) throws
      Creates the aggregator.
      Parameters:
      parent - The parent aggregator (if this is a top level factory, the parent will be null)
      cardinality - Upper bound of the number of owningBucketOrds that the Aggregator created by this method will be asked to collect.
      Throws:
    • getParent

      public AggregatorFactory 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.