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 FieldContext
fieldContext()
ValuesSourceConfig<VS>
fieldContext(FieldContext fieldContext)
DocValueFormat
format()
ValuesSourceConfig<VS>
format(DocValueFormat format)
java.lang.Object
missing()
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 aValuesSourceConfig
given 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 aValuesSourceConfig
given configuration parameters.AggregationScript.LeafFactory
script()
ValuesSourceConfig<VS>
script(AggregationScript.LeafFactory script)
ValueType
scriptValueType()
ValuesSourceConfig<VS>
scriptValueType(ValueType scriptValueType)
java.time.ZoneId
timezone()
ValuesSourceConfig<VS>
timezone(java.time.ZoneId timeZone)
VS
toValuesSource(QueryShardContext context)
VS
toValuesSource(QueryShardContext context, java.util.function.Function<java.lang.Object,ValuesSource> resolveMissingAny)
Get a value source given its configuration.boolean
unmapped()
ValuesSourceConfig<VS>
unmapped(boolean unmapped)
boolean
valid()
ValuesSourceType
valueSourceType()
-
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 aValuesSourceConfig
given 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 aValuesSourceConfig
given 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.
-