Class ValuesSourceConfig<VS extends ValuesSource>
java.lang.Object
org.elasticsearch.search.aggregations.support.ValuesSourceConfig<VS>
public class ValuesSourceConfig<VS extends ValuesSource>
extends java.lang.Object
A configuration that tells aggregations how to retrieve data from the index
in order to run a specific aggregation.
-
Constructor Summary
Constructors Constructor Description ValuesSourceConfig(ValuesSourceType valueSourceType) -
Method Summary
Modifier and Type Method Description FieldContextfieldContext()ValuesSourceConfig<VS>fieldContext(FieldContext fieldContext)DocValueFormatformat()ValuesSourceConfig<VS>format(DocValueFormat format)java.lang.Objectmissing()ValuesSourceConfig<VS>missing(java.lang.Object missing)static <VS extends ValuesSource>
ValuesSourceConfig<VS>resolve(QueryShardContext context, ValueType valueType, java.lang.String field, Script script, java.lang.Object missing, java.time.ZoneId timeZone, java.lang.String format)Resolve aValuesSourceConfiggiven configuration parameters.static <VS extends ValuesSource>
ValuesSourceConfig<VS>resolve(QueryShardContext context, ValueType valueType, java.lang.String field, Script script, java.lang.Object missing, java.time.ZoneId timeZone, java.lang.String format, java.util.function.Function<Script,ValuesSourceType> resolveScriptAny)Resolve aValuesSourceConfiggiven configuration parameters.AggregationScript.LeafFactoryscript()ValuesSourceConfig<VS>script(AggregationScript.LeafFactory script)ValueTypescriptValueType()ValuesSourceConfig<VS>scriptValueType(ValueType scriptValueType)java.time.ZoneIdtimezone()ValuesSourceConfig<VS>timezone(java.time.ZoneId timeZone)VStoValuesSource(QueryShardContext context)VStoValuesSource(QueryShardContext context, java.util.function.Function<java.lang.Object,ValuesSource> resolveMissingAny)Get a value source given its configuration.booleanunmapped()ValuesSourceConfig<VS>unmapped(boolean unmapped)booleanvalid()ValuesSourceTypevalueSourceType()
-
Constructor Details
-
Method Details
-
resolve
public static <VS extends ValuesSource> ValuesSourceConfig<VS> resolve(QueryShardContext context, ValueType valueType, java.lang.String field, Script script, java.lang.Object missing, java.time.ZoneId timeZone, java.lang.String format)Resolve aValuesSourceConfiggiven configuration parameters. -
resolve
public static <VS extends ValuesSource> ValuesSourceConfig<VS> resolve(QueryShardContext context, ValueType valueType, java.lang.String field, Script script, java.lang.Object missing, java.time.ZoneId timeZone, java.lang.String format, java.util.function.Function<Script,ValuesSourceType> resolveScriptAny)Resolve aValuesSourceConfiggiven configuration parameters. -
valueSourceType
-
fieldContext
-
script
-
unmapped
public boolean unmapped() -
valid
public boolean valid() -
fieldContext
-
script
-
scriptValueType
-
scriptValueType
-
unmapped
-
format
-
missing
-
missing
public java.lang.Object missing() -
timezone
-
timezone
public java.time.ZoneId timezone() -
format
-
toValuesSource
-
toValuesSource
@Nullable public VS toValuesSource(QueryShardContext context, java.util.function.Function<java.lang.Object,ValuesSource> resolveMissingAny)Get a value source given its configuration. A return value of null indicates that no value source could be built.
-