Class ValuesSourceRegistry.Builder
java.lang.Object
org.elasticsearch.search.aggregations.support.ValuesSourceRegistry.Builder
- Enclosing class:
- ValuesSourceRegistry
public static class ValuesSourceRegistry.Builder
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description ValuesSourceRegistry
build()
void
register(java.lang.String aggregationName, java.util.List<ValuesSourceType> valuesSourceTypes, AggregatorSupplier aggregatorSupplier)
Register a ValuesSource to Aggregator mapping.void
register(java.lang.String aggregationName, ValuesSourceType valuesSourceType, AggregatorSupplier aggregatorSupplier)
Register a ValuesSource to Aggregator mapping.void
registerUsage(java.lang.String aggregationName)
void
registerUsage(java.lang.String aggregationName, ValuesSourceType valuesSourceType)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
register
public void register(java.lang.String aggregationName, ValuesSourceType valuesSourceType, AggregatorSupplier aggregatorSupplier)Register a ValuesSource to Aggregator mapping. This method registers mappings that only apply to a singleValuesSourceType
- Parameters:
aggregationName
- The name of the family of aggregations, typically found viaBaseAggregationBuilder.getType()
valuesSourceType
- The ValuesSourceType this mapping applies to.aggregatorSupplier
- An Aggregation-specific specialization of AggregatorSupplier which will construct the mapped aggregator from the aggregation standard set of parameters
-
register
public void register(java.lang.String aggregationName, java.util.List<ValuesSourceType> valuesSourceTypes, AggregatorSupplier aggregatorSupplier)Register a ValuesSource to Aggregator mapping. This version provides a convenience method for mappings that apply to a known list ofValuesSourceType
- Parameters:
aggregationName
- The name of the family of aggregations, typically found viaBaseAggregationBuilder.getType()
valuesSourceTypes
- The ValuesSourceTypes this mapping applies to.aggregatorSupplier
- An Aggregation-specific specialization of AggregatorSupplier which will construct the mapped aggregator from the aggregation standard set of parameters
-
registerUsage
-
registerUsage
public void registerUsage(java.lang.String aggregationName) -
build
-