public abstract class MultiValuesSourceAggregationBuilder<VS extends ValuesSource,AB extends MultiValuesSourceAggregationBuilder<VS,AB>> extends AbstractAggregationBuilder<AB>
Modifier and Type | Class and Description |
---|---|
static class |
MultiValuesSourceAggregationBuilder.LeafOnly<VS extends ValuesSource,AB extends MultiValuesSourceAggregationBuilder<VS,AB>> |
AggregationBuilder.CommonFields
Writeable.Reader<V>, Writeable.Writer<V>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static ParseField |
MULTIVALUE_MODE_FIELD |
metaData
factoriesBuilder, name
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
MultiValuesSourceAggregationBuilder(StreamInput in,
ValuesSourceType valuesSourceType) |
protected |
MultiValuesSourceAggregationBuilder(StreamInput in,
ValuesSourceType valuesSourceType,
ValueType targetValueType) |
protected |
MultiValuesSourceAggregationBuilder(java.lang.String name,
ValuesSourceType valuesSourceType,
ValueType targetValueType) |
Modifier and Type | Method and Description |
---|---|
ValuesSourceConfig<VS> |
config(SearchContext context,
java.lang.String field,
Script script) |
protected MultiValuesSourceAggregatorFactory<VS,?> |
doBuild(SearchContext context,
AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactoriesBuilder) |
protected boolean |
doEquals(java.lang.Object obj) |
protected int |
doHashCode() |
protected void |
doWriteTo(StreamOutput out) |
protected abstract XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
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.
|
protected abstract MultiValuesSourceAggregatorFactory<VS,?> |
innerBuild(SearchContext context,
java.util.Map<java.lang.String,ValuesSourceConfig<VS>> configs,
AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactoriesBuilder) |
protected abstract boolean |
innerEquals(java.lang.Object obj) |
protected abstract int |
innerHashCode() |
protected abstract void |
innerWriteTo(StreamOutput out)
Write subclass' state to the stream
|
XContentBuilder |
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
document
|
AB |
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
document
|
protected java.util.Map<java.lang.String,ValuesSourceConfig<VS>> |
resolveConfig(SearchContext context) |
protected boolean |
serializeTargetValueType()
Should this builder serialize its targetValueType? Defaults to false.
|
ValueType |
valueType()
Gets the
ValueType for the value produced by this aggregation |
AB |
valueType(ValueType valueType)
Sets the
ValueType for the value produced by this aggregation |
build, equals, getWriteableName, hashCode, setMetaData, subAggregation, subAggregation, subAggregations, toXContent, writeTo
getName
buildAsBytes, buildAsBytes, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isFragment
getType
public static final ParseField MULTIVALUE_MODE_FIELD
protected MultiValuesSourceAggregationBuilder(java.lang.String name, ValuesSourceType valuesSourceType, ValueType targetValueType)
protected MultiValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType, ValueType targetValueType) throws java.io.IOException
java.io.IOException
protected MultiValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType) throws java.io.IOException
java.io.IOException
protected final void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class AbstractAggregationBuilder<AB extends MultiValuesSourceAggregationBuilder<VS,AB>>
java.io.IOException
protected abstract void innerWriteTo(StreamOutput out) throws java.io.IOException
java.io.IOException
public AB fields(java.util.List<java.lang.String> fields)
public java.util.List<java.lang.String> fields()
public AB valueType(ValueType valueType)
ValueType
for the value produced by this aggregationpublic ValueType valueType()
ValueType
for the value produced by this aggregationpublic AB format(java.lang.String format)
public java.lang.String format()
public AB missingMap(java.util.Map<java.lang.String,java.lang.Object> missingMap)
public java.util.Map<java.lang.String,java.lang.Object> missingMap()
protected final MultiValuesSourceAggregatorFactory<VS,?> doBuild(SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException
doBuild
in class AbstractAggregationBuilder<AB extends MultiValuesSourceAggregationBuilder<VS,AB>>
java.io.IOException
protected java.util.Map<java.lang.String,ValuesSourceConfig<VS>> resolveConfig(SearchContext context)
protected abstract MultiValuesSourceAggregatorFactory<VS,?> innerBuild(SearchContext context, java.util.Map<java.lang.String,ValuesSourceConfig<VS>> configs, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException
java.io.IOException
public ValuesSourceConfig<VS> config(SearchContext context, java.lang.String field, Script script)
protected boolean serializeTargetValueType()
public final XContentBuilder internalXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
internalXContent
in class AbstractAggregationBuilder<AB extends MultiValuesSourceAggregationBuilder<VS,AB>>
java.io.IOException
protected abstract XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOException
protected final int doHashCode()
doHashCode
in class AbstractAggregationBuilder<AB extends MultiValuesSourceAggregationBuilder<VS,AB>>
protected abstract int innerHashCode()
protected final boolean doEquals(java.lang.Object obj)
doEquals
in class AbstractAggregationBuilder<AB extends MultiValuesSourceAggregationBuilder<VS,AB>>
protected abstract boolean innerEquals(java.lang.Object obj)