Class ArrayValuesSourceAggregatorFactory

    • Constructor Detail

      • ArrayValuesSourceAggregatorFactory

        public ArrayValuesSourceAggregatorFactory​(java.lang.String name,
                                                  java.util.Map<java.lang.String,​ValuesSourceConfig> configs,
                                                  QueryShardContext queryShardContext,
                                                  AggregatorFactory parent,
                                                  AggregatorFactories.Builder subFactoriesBuilder,
                                                  java.util.Map<java.lang.String,​java.lang.Object> metadata)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • createUnmapped

        protected abstract Aggregator createUnmapped​(SearchContext searchContext,
                                                     Aggregator parent,
                                                     java.util.Map<java.lang.String,​java.lang.Object> metadata)
                                              throws java.io.IOException
        Create the Aggregator when none of the configured fields can be resolved to a ValuesSource.
        Throws:
        java.io.IOException
      • doCreateInternal

        protected abstract Aggregator doCreateInternal​(java.util.Map<java.lang.String,​ValuesSource> valuesSources,
                                                       SearchContext searchContext,
                                                       Aggregator parent,
                                                       CardinalityUpperBound cardinality,
                                                       java.util.Map<java.lang.String,​java.lang.Object> metadata)
                                                throws java.io.IOException
        Create the Aggregator when any of the configured fields can be resolved to a ValuesSource.
        Parameters:
        cardinality - Upper bound of the number of owningBucketOrds that the Aggregator created by this method will be asked to collect.
        Throws:
        java.io.IOException