Class ArrayValuesSourceAggregationBuilder<VS extends ValuesSource,AB extends ArrayValuesSourceAggregationBuilder<VS,AB>>
java.lang.Object
org.elasticsearch.search.aggregations.AggregationBuilder
org.elasticsearch.search.aggregations.AbstractAggregationBuilder<AB>
org.elasticsearch.search.aggregations.support.ArrayValuesSourceAggregationBuilder<VS,AB>
- All Implemented Interfaces:
NamedWriteable
,Writeable
,ToXContent
,ToXContentFragment
,BaseAggregationBuilder
- Direct Known Subclasses:
ArrayValuesSourceAggregationBuilder.LeafOnly
public abstract class ArrayValuesSourceAggregationBuilder<VS extends ValuesSource,AB extends ArrayValuesSourceAggregationBuilder<VS,AB>> extends AbstractAggregationBuilder<AB>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ArrayValuesSourceAggregationBuilder.LeafOnly<VS extends ValuesSource,AB extends ArrayValuesSourceAggregationBuilder<VS,AB>>
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
AggregationBuilder.CommonFields
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V extends java.lang.Object>, Writeable.Writer<V extends java.lang.Object>
-
Field Summary
Fields Modifier and Type Field Description static ParseField
MULTIVALUE_MODE_FIELD
Fields inherited from class org.elasticsearch.search.aggregations.AbstractAggregationBuilder
metaData
Fields inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
factoriesBuilder, name
-
Constructor Summary
Constructors Modifier Constructor Description protected
ArrayValuesSourceAggregationBuilder(java.lang.String name, ValuesSourceType valuesSourceType, ValueType targetValueType)
protected
ArrayValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType)
protected
ArrayValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType, ValueType targetValueType)
protected
ArrayValuesSourceAggregationBuilder(ArrayValuesSourceAggregationBuilder<VS,AB> clone, AggregatorFactories.Builder factoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metaData)
-
Method Summary
Modifier and Type Method Description ValuesSourceConfig<VS>
config(QueryShardContext queryShardContext, java.lang.String field, Script script)
protected ArrayValuesSourceAggregatorFactory<VS>
doBuild(QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder)
protected void
doWriteTo(StreamOutput out)
protected abstract XContentBuilder
doXContentBody(XContentBuilder builder, ToXContent.Params params)
boolean
equals(java.lang.Object obj)
java.util.List<java.lang.String>
fields()
Gets the field to use for this aggregation.AB
fields(java.util.List<java.lang.String> fields)
Sets the field to use for this aggregation.java.lang.String
format()
Gets the format to use for the output of the aggregation.AB
format(java.lang.String format)
Sets the format to use for the output of the aggregation.int
hashCode()
protected abstract ArrayValuesSourceAggregatorFactory<VS>
innerBuild(QueryShardContext queryShardContext, java.util.Map<java.lang.String,ValuesSourceConfig<VS>> configs, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder)
protected abstract void
innerWriteTo(StreamOutput out)
Write subclass' state to the streamXContentBuilder
internalXContent(XContentBuilder builder, ToXContent.Params params)
java.util.Map<java.lang.String,java.lang.Object>
missingMap()
Gets the value to use when the aggregation finds a missing value in a documentAB
missingMap(java.util.Map<java.lang.String,java.lang.Object> missingMap)
Sets the value to use when the aggregation finds a missing value in a documentprotected java.util.Map<java.lang.String,ValuesSourceConfig<VS>>
resolveConfig(QueryShardContext queryShardContext)
protected boolean
serializeTargetValueType()
Should this builder serialize its targetValueType? Defaults to false.ValueType
valueType()
Gets theValueType
for the value produced by this aggregationAB
valueType(ValueType valueType)
Sets theValueType
for the value produced by this aggregationMethods inherited from class org.elasticsearch.search.aggregations.AbstractAggregationBuilder
build, getMetaData, getWriteableName, setMetaData, subAggregation, subAggregation, subAggregations, toXContent, writeTo
Methods inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
doRewrite, getName, getPipelineAggregations, getSubAggregations, rewrite, shallowCopy, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.search.aggregations.BaseAggregationBuilder
getType
-
Field Details
-
Constructor Details
-
ArrayValuesSourceAggregationBuilder
protected ArrayValuesSourceAggregationBuilder(java.lang.String name, ValuesSourceType valuesSourceType, ValueType targetValueType) -
ArrayValuesSourceAggregationBuilder
protected ArrayValuesSourceAggregationBuilder(ArrayValuesSourceAggregationBuilder<VS,AB> clone, AggregatorFactories.Builder factoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metaData) -
ArrayValuesSourceAggregationBuilder
protected ArrayValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType, ValueType targetValueType) throws java.io.IOException- Throws:
java.io.IOException
-
ArrayValuesSourceAggregationBuilder
protected ArrayValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Details
-
doWriteTo
- Specified by:
doWriteTo
in classAbstractAggregationBuilder<AB extends ArrayValuesSourceAggregationBuilder<VS,AB>>
- Throws:
java.io.IOException
-
innerWriteTo
Write subclass' state to the stream- Throws:
java.io.IOException
-
fields
Sets the field to use for this aggregation. -
fields
public java.util.List<java.lang.String> fields()Gets the field to use for this aggregation. -
valueType
Sets theValueType
for the value produced by this aggregation -
valueType
Gets theValueType
for the value produced by this aggregation -
format
Sets the format to use for the output of the aggregation. -
format
public java.lang.String format()Gets the format to use for the output of the aggregation. -
missingMap
Sets the value to use when the aggregation finds a missing value in a document -
missingMap
public java.util.Map<java.lang.String,java.lang.Object> missingMap()Gets the value to use when the aggregation finds a missing value in a document -
doBuild
protected final ArrayValuesSourceAggregatorFactory<VS> doBuild(QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException- Specified by:
doBuild
in classAbstractAggregationBuilder<AB extends ArrayValuesSourceAggregationBuilder<VS,AB>>
- Throws:
java.io.IOException
-
resolveConfig
protected java.util.Map<java.lang.String,ValuesSourceConfig<VS>> resolveConfig(QueryShardContext queryShardContext) -
innerBuild
protected abstract ArrayValuesSourceAggregatorFactory<VS> innerBuild(QueryShardContext queryShardContext, java.util.Map<java.lang.String,ValuesSourceConfig<VS>> configs, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException- Throws:
java.io.IOException
-
config
public ValuesSourceConfig<VS> config(QueryShardContext queryShardContext, java.lang.String field, Script script) -
serializeTargetValueType
protected boolean serializeTargetValueType()Should this builder serialize its targetValueType? Defaults to false. All subclasses that override this to true should use the three argument read constructor rather than the four argument version. -
internalXContent
public final XContentBuilder internalXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
internalXContent
in classAbstractAggregationBuilder<AB extends ArrayValuesSourceAggregationBuilder<VS,AB>>
- Throws:
java.io.IOException
-
doXContentBody
protected abstract XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Throws:
java.io.IOException
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractAggregationBuilder<AB extends ArrayValuesSourceAggregationBuilder<VS,AB>>
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classAbstractAggregationBuilder<AB extends ArrayValuesSourceAggregationBuilder<VS,AB>>
-