NamedWriteable, Writeable, ToXContent, ToXContentFragment, BaseAggregationBuilderAbstractRangeBuilder, DateHistogramAggregationBuilder, DiversifiedAggregationBuilder, GeoBoundsAggregationBuilder, GeoDistanceAggregationBuilder, GeoGridAggregationBuilder, HistogramAggregationBuilder, IpRangeAggregationBuilder, MissingAggregationBuilder, SignificantTermsAggregationBuilder, TermsAggregationBuilder, ValuesSourceAggregationBuilder.LeafOnlypublic abstract class ValuesSourceAggregationBuilder<VS extends ValuesSource,AB extends ValuesSourceAggregationBuilder<VS,AB>> extends AbstractAggregationBuilder<AB>
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ValuesSourceAggregationBuilder.LeafOnly<VS extends ValuesSource,AB extends ValuesSourceAggregationBuilder<VS,AB>> |
AggregationBuilder.CommonFieldsToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field | Description |
|---|---|---|
protected ValuesSourceConfig<VS> |
config |
metaDatafactoriesBuilder, nameEMPTY_PARAMS| Modifier | Constructor | Description |
|---|---|---|
protected |
ValuesSourceAggregationBuilder(java.lang.String name,
ValuesSourceType valuesSourceType,
ValueType targetValueType) |
|
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(ValuesSourceAggregationBuilder<VS,AB> clone,
AggregatorFactories.Builder factoriesBuilder,
java.util.Map<java.lang.String,java.lang.Object> metaData) |
| Modifier and Type | Method | 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, getMetaData, getWriteableName, hashCode, setMetaData, subAggregation, subAggregation, subAggregations, toXContent, writeTodoRewrite, getName, getPipelineAggregations, getSubAggregations, rewrite, shallowCopy, toStringgetTypeclone, finalize, getClass, notify, notifyAll, wait, wait, waitisFragmentprotected ValuesSourceConfig<VS extends ValuesSource> config
protected ValuesSourceAggregationBuilder(java.lang.String name,
ValuesSourceType valuesSourceType,
ValueType targetValueType)
protected ValuesSourceAggregationBuilder(ValuesSourceAggregationBuilder<VS,AB> clone, AggregatorFactories.Builder factoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metaData)
protected ValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType, ValueType targetValueType) throws java.io.IOException
java.io.IOExceptionprotected ValuesSourceAggregationBuilder(StreamInput in, ValuesSourceType valuesSourceType) throws java.io.IOException
serializeTargetValueType() to return true.java.io.IOExceptionprotected final void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo in class AbstractAggregationBuilder<AB extends ValuesSourceAggregationBuilder<VS,AB>>java.io.IOExceptionprotected abstract void innerWriteTo(StreamOutput out) throws java.io.IOException
java.io.IOExceptionprotected 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.IOExceptionprotected 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.IOExceptionpublic final XContentBuilder internalXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
internalXContent in class AbstractAggregationBuilder<AB extends ValuesSourceAggregationBuilder<VS,AB>>java.io.IOExceptionprotected abstract XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOExceptionprotected 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)