public abstract class ValuesSourceAggregatorBuilder<VS extends ValuesSource,AB extends ValuesSourceAggregatorBuilder<VS,AB>> extends AggregatorBuilder<AB>
Modifier and Type | Class and Description |
---|---|
static class |
ValuesSourceAggregatorBuilder.LeafOnly<VS extends ValuesSource,AB extends ValuesSourceAggregatorBuilder<VS,AB>> |
Writeable.Reader<R>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
protected ValuesSourceConfig<VS> |
config |
factoriesBuilder, metaData, name, type
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
ValuesSourceAggregatorBuilder(java.lang.String name,
InternalAggregation.Type type,
ValuesSourceType valuesSourceType,
ValueType targetValueType) |
Modifier and Type | Method and Description |
---|---|
ValuesSourceConfig<VS> |
config(AggregationContext context) |
protected ValuesSourceAggregatorFactory<VS,?> |
doBuild(AggregationContext context,
AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactoriesBuilder) |
protected boolean |
doEquals(java.lang.Object obj) |
protected int |
doHashCode() |
protected AB |
doReadFrom(java.lang.String name,
StreamInput in) |
protected void |
doWriteTo(StreamOutput out) |
protected abstract XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
java.lang.String |
field()
Gets the field to use for this aggregation.
|
AB |
field(java.lang.String field)
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 ValuesSourceAggregatorFactory<VS,?> |
innerBuild(AggregationContext context,
ValuesSourceConfig<VS> config,
AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactoriesBuilder) |
protected abstract boolean |
innerEquals(java.lang.Object obj) |
protected abstract int |
innerHashCode() |
protected abstract ValuesSourceAggregatorBuilder<VS,AB> |
innerReadFrom(java.lang.String name,
ValuesSourceType valuesSourceType,
ValueType targetValueType,
StreamInput in) |
protected abstract void |
innerWriteTo(StreamOutput out) |
XContentBuilder |
internalXContent(XContentBuilder builder,
ToXContent.Params params) |
java.lang.Object |
missing()
Gets the value to use when the aggregation finds a missing value in a
document
|
AB |
missing(java.lang.Object missing)
Sets the value to use when the aggregation finds a missing value in a
document
|
protected ValuesSourceConfig<VS> |
resolveConfig(AggregationContext context) |
Script |
script()
Gets the script to use for this aggregation.
|
AB |
script(Script script)
Sets the script to use for this aggregation.
|
org.joda.time.DateTimeZone |
timeZone()
Gets the time zone to use for this aggregation
|
AB |
timeZone(org.joda.time.DateTimeZone timeZone)
Sets the time zone to use for this aggregation
|
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, getType, getWriteableName, hashCode, readFrom, setMetaData, subAggregation, subAggregation, subAggregations, toXContent, writeTo
buildAsBytes, buildAsBytes, toString
protected ValuesSourceConfig<VS extends ValuesSource> config
protected ValuesSourceAggregatorBuilder(java.lang.String name, InternalAggregation.Type type, ValuesSourceType valuesSourceType, ValueType targetValueType)
public AB field(java.lang.String field)
public java.lang.String field()
public Script script()
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 missing(java.lang.Object missing)
public java.lang.Object missing()
public AB timeZone(org.joda.time.DateTimeZone timeZone)
public org.joda.time.DateTimeZone timeZone()
protected final ValuesSourceAggregatorFactory<VS,?> doBuild(AggregationContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException
doBuild
in class AggregatorBuilder<AB extends ValuesSourceAggregatorBuilder<VS,AB>>
java.io.IOException
protected ValuesSourceConfig<VS> resolveConfig(AggregationContext context)
protected abstract ValuesSourceAggregatorFactory<VS,?> innerBuild(AggregationContext context, ValuesSourceConfig<VS> config, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException
java.io.IOException
public ValuesSourceConfig<VS> config(AggregationContext context)
protected final void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class AggregatorBuilder<AB extends ValuesSourceAggregatorBuilder<VS,AB>>
java.io.IOException
protected abstract void innerWriteTo(StreamOutput out) throws java.io.IOException
java.io.IOException
protected final AB doReadFrom(java.lang.String name, StreamInput in) throws java.io.IOException
doReadFrom
in class AggregatorBuilder<AB extends ValuesSourceAggregatorBuilder<VS,AB>>
java.io.IOException
protected abstract ValuesSourceAggregatorBuilder<VS,AB> innerReadFrom(java.lang.String name, ValuesSourceType valuesSourceType, ValueType targetValueType, StreamInput in) throws java.io.IOException
java.io.IOException
public final XContentBuilder internalXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
internalXContent
in class AggregatorBuilder<AB extends ValuesSourceAggregatorBuilder<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 AggregatorBuilder<AB extends ValuesSourceAggregatorBuilder<VS,AB>>
protected abstract int innerHashCode()
protected final boolean doEquals(java.lang.Object obj)
doEquals
in class AggregatorBuilder<AB extends ValuesSourceAggregatorBuilder<VS,AB>>
protected abstract boolean innerEquals(java.lang.Object obj)