public abstract class ValuesSourceAggregationBuilder<VS extends ValuesSource,AB extends ValuesSourceAggregationBuilder<VS,AB>> extends AbstractAggregationBuilder<AB>
Modifier and Type | Class and Description |
---|---|
static class |
ValuesSourceAggregationBuilder.LeafOnly<VS extends ValuesSource,AB extends ValuesSourceAggregationBuilder<VS,AB>> |
AggregationBuilder.CommonFields
Writeable.Reader<V>, Writeable.Writer<V>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
protected ValuesSourceConfig<VS> |
config |
metaData
factoriesBuilder, name
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
ValuesSourceAggregationBuilder(StreamInput in,
ValuesSourceType valuesSourceType)
Read an aggregation from a stream that serializes its targetValueType.
|
protected |
ValuesSourceAggregationBuilder(StreamInput in,
ValuesSourceType valuesSourceType,
ValueType targetValueType)
Read an aggregation from a stream that does not serialize its targetValueType.
|
protected |
ValuesSourceAggregationBuilder(java.lang.String name,
ValuesSourceType valuesSourceType,
ValueType targetValueType) |
Modifier and Type | Method and Description |
---|---|
protected ValuesSourceAggregatorFactory<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.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(SearchContext context,
ValuesSourceConfig<VS> config,
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's state to the stream.
|
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(SearchContext context) |
Script |
script()
Gets the script to use for this aggregation.
|
AB |
script(Script script)
Sets the script to use for this aggregation.
|
protected boolean |
serializeTargetValueType()
Should this builder serialize its targetValueType? Defaults to false.
|
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, getWriteableName, hashCode, setMetaData, subAggregation, subAggregation, subAggregations, toXContent, writeTo
getName
buildAsBytes, buildAsBytes, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isFragment
getType
protected ValuesSourceConfig<VS extends ValuesSource> config
protected ValuesSourceAggregationBuilder(java.lang.String name, ValuesSourceType valuesSourceType, ValueType targetValueType)
protected ValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType, ValueType targetValueType) throws java.io.IOException
java.io.IOException
protected ValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType) throws java.io.IOException
serializeTargetValueType()
to return true.java.io.IOException
protected final void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class AbstractAggregationBuilder<AB extends ValuesSourceAggregationBuilder<VS,AB>>
java.io.IOException
protected abstract void innerWriteTo(StreamOutput out) throws java.io.IOException
java.io.IOException
protected boolean serializeTargetValueType()
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(SearchContext context, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException
doBuild
in class AbstractAggregationBuilder<AB extends ValuesSourceAggregationBuilder<VS,AB>>
java.io.IOException
protected ValuesSourceConfig<VS> resolveConfig(SearchContext context)
protected abstract ValuesSourceAggregatorFactory<VS,?> innerBuild(SearchContext context, ValuesSourceConfig<VS> config, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException
java.io.IOException
public final XContentBuilder internalXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
internalXContent
in class AbstractAggregationBuilder<AB extends ValuesSourceAggregationBuilder<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 ValuesSourceAggregationBuilder<VS,AB>>
protected abstract int innerHashCode()
protected final boolean doEquals(java.lang.Object obj)
doEquals
in class AbstractAggregationBuilder<AB extends ValuesSourceAggregationBuilder<VS,AB>>
protected abstract boolean innerEquals(java.lang.Object obj)