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, org.joda.time.DateTimeZone timeZone, java.lang.String format)
Resolve aValuesSourceConfig
given configuration parameters.SearchScript.LeafFactory
script()
ValuesSourceConfig<VS>
script(SearchScript.LeafFactory script)
ValueType
scriptValueType()
ValuesSourceConfig<VS>
scriptValueType(ValueType scriptValueType)
org.joda.time.DateTimeZone
timezone()
ValuesSourceConfig<VS>
timezone(org.joda.time.DateTimeZone timeZone)
VS
toValuesSource(QueryShardContext context)
Get a value source given its configuration.boolean
unmapped()
ValuesSourceConfig<VS>
unmapped(boolean unmapped)
boolean
valid()
ValuesSourceType
valueSourceType()
-
-
-
Constructor Detail
-
ValuesSourceConfig
public ValuesSourceConfig(ValuesSourceType valueSourceType)
-
-
Method Detail
-
resolve
public static <VS extends ValuesSource> ValuesSourceConfig<VS> resolve(QueryShardContext context, ValueType valueType, java.lang.String field, Script script, java.lang.Object missing, org.joda.time.DateTimeZone timeZone, java.lang.String format)
Resolve aValuesSourceConfig
given configuration parameters.
-
valueSourceType
public ValuesSourceType valueSourceType()
-
fieldContext
public FieldContext fieldContext()
-
script
public SearchScript.LeafFactory script()
-
unmapped
public boolean unmapped()
-
valid
public boolean valid()
-
fieldContext
public ValuesSourceConfig<VS> fieldContext(FieldContext fieldContext)
-
script
public ValuesSourceConfig<VS> script(SearchScript.LeafFactory script)
-
scriptValueType
public ValuesSourceConfig<VS> scriptValueType(ValueType scriptValueType)
-
scriptValueType
public ValueType scriptValueType()
-
unmapped
public ValuesSourceConfig<VS> unmapped(boolean unmapped)
-
format
public ValuesSourceConfig<VS> format(DocValueFormat format)
-
missing
public ValuesSourceConfig<VS> missing(java.lang.Object missing)
-
missing
public java.lang.Object missing()
-
timezone
public ValuesSourceConfig<VS> timezone(org.joda.time.DateTimeZone timeZone)
-
timezone
public org.joda.time.DateTimeZone timezone()
-
format
public DocValueFormat format()
-
toValuesSource
@Nullable public VS toValuesSource(QueryShardContext context) throws java.io.IOException
Get a value source given its configuration. A return value of null indicates that no value source could be built.- Throws:
java.io.IOException
-
-