Class ArrayValuesSourceAggregatorFactory
java.lang.Object
org.opensearch.search.aggregations.AggregatorFactory
org.opensearch.search.aggregations.support.ArrayValuesSourceAggregatorFactory
-
Field Summary
FieldsFields inherited from class org.opensearch.search.aggregations.AggregatorFactory
factories, metadata, name, parent, queryShardContext -
Constructor Summary
ConstructorsConstructorDescriptionArrayValuesSourceAggregatorFactory(String name, Map<String, ValuesSourceConfig> configs, QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metadata) -
Method Summary
Modifier and TypeMethodDescriptioncreateInternal(SearchContext searchContext, Aggregator parent, CardinalityUpperBound cardinality, Map<String, Object> metadata) protected abstract AggregatorcreateUnmapped(SearchContext searchContext, Aggregator parent, Map<String, Object> metadata) Create the Aggregator when none of the configured fields can be resolved to aValuesSource.protected abstract AggregatordoCreateInternal(Map<String, ValuesSource> valuesSources, SearchContext searchContext, Aggregator parent, CardinalityUpperBound cardinality, Map<String, Object> metadata) Create the Aggregator when any of the configured fields can be resolved to aValuesSource.Methods inherited from class org.opensearch.search.aggregations.AggregatorFactory
create, doValidate, evaluateChildFactories, getParent, getStatsSubtype, getSubFactories, name, supportsConcurrentSegmentSearch
-
Field Details
-
configs
-
-
Constructor Details
-
ArrayValuesSourceAggregatorFactory
public ArrayValuesSourceAggregatorFactory(String name, Map<String, ValuesSourceConfig> configs, QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metadata) throws IOException- Throws:
IOException
-
-
Method Details
-
createInternal
public Aggregator createInternal(SearchContext searchContext, Aggregator parent, CardinalityUpperBound cardinality, Map<String, Object> metadata) throws IOException- Specified by:
createInternalin classAggregatorFactory- Throws:
IOException
-
createUnmapped
protected abstract Aggregator createUnmapped(SearchContext searchContext, Aggregator parent, Map<String, Object> metadata) throws IOExceptionCreate the Aggregator when none of the configured fields can be resolved to aValuesSource.- Throws:
IOException
-
doCreateInternal
protected abstract Aggregator doCreateInternal(Map<String, ValuesSource> valuesSources, SearchContext searchContext, Aggregator parent, CardinalityUpperBound cardinality, Map<String, Object> metadata) throws IOExceptionCreate the Aggregator when any of the configured fields can be resolved to aValuesSource.- Parameters:
cardinality- Upper bound of the number ofowningBucketOrds that theAggregatorcreated by this method will be asked to collect.- Throws:
IOException
-