public class RangeAggregatorBuilder extends AbstractRangeBuilder<RangeAggregatorBuilder,RangeAggregator.Range>
ValuesSourceAggregatorBuilder.LeafOnly<VS extends ValuesSource,AB extends ValuesSourceAggregatorBuilder<VS,AB>>
Writeable.Reader<R>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
keyed, rangeFactory, ranges
config
factoriesBuilder, metaData, name, type
EMPTY_PARAMS
Constructor and Description |
---|
RangeAggregatorBuilder(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
RangeAggregatorBuilder |
addRange(double from,
double to)
Same as
addRange(String, double, double) but the key will be
automatically generated based on from and
to . |
RangeAggregatorBuilder |
addRange(java.lang.String key,
double from,
double to)
Add a new range to this aggregation.
|
RangeAggregatorBuilder |
addUnboundedFrom(double from)
Same as
addUnboundedFrom(String, double) but the key will be
computed automatically. |
RangeAggregatorBuilder |
addUnboundedFrom(java.lang.String key,
double from)
Add a new range with no upper bound.
|
RangeAggregatorBuilder |
addUnboundedTo(double to)
Same as
addUnboundedTo(String, double) but the key will be
computed automatically. |
RangeAggregatorBuilder |
addUnboundedTo(java.lang.String key,
double to)
Add a new range with no lower bound.
|
protected RangeAggregatorBuilder |
createFactoryFromStream(java.lang.String name,
StreamInput in) |
protected RangeAggregatorFactory |
innerBuild(AggregationContext context,
ValuesSourceConfig<ValuesSource.Numeric> config,
AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactoriesBuilder) |
addRange, doXContentBody, innerEquals, innerHashCode, innerReadFrom, innerWriteTo, keyed, keyed, ranges
config, doBuild, doEquals, doHashCode, doReadFrom, doWriteTo, field, field, format, format, internalXContent, missing, missing, resolveConfig, script, script, timeZone, timeZone, valueType, valueType
build, equals, getType, getWriteableName, hashCode, readFrom, setMetaData, subAggregation, subAggregation, subAggregations, toXContent, writeTo
buildAsBytes, buildAsBytes, toString
public RangeAggregatorBuilder addRange(java.lang.String key, double from, double to)
key
- the key to use for this range in the responsefrom
- the lower bound on the distances, inclusiveto
- the upper bound on the distances, exclusivepublic RangeAggregatorBuilder addRange(double from, double to)
addRange(String, double, double)
but the key will be
automatically generated based on from
and
to
.public RangeAggregatorBuilder addUnboundedTo(java.lang.String key, double to)
key
- the key to use for this range in the responseto
- the upper bound on the distances, exclusivepublic RangeAggregatorBuilder addUnboundedTo(double to)
addUnboundedTo(String, double)
but the key will be
computed automatically.public RangeAggregatorBuilder addUnboundedFrom(java.lang.String key, double from)
key
- the key to use for this range in the responsefrom
- the lower bound on the distances, inclusivepublic RangeAggregatorBuilder addUnboundedFrom(double from)
addUnboundedFrom(String, double)
but the key will be
computed automatically.protected RangeAggregatorFactory innerBuild(AggregationContext context, ValuesSourceConfig<ValuesSource.Numeric> config, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException
innerBuild
in class ValuesSourceAggregatorBuilder<ValuesSource.Numeric,RangeAggregatorBuilder>
java.io.IOException
protected RangeAggregatorBuilder createFactoryFromStream(java.lang.String name, StreamInput in) throws java.io.IOException
createFactoryFromStream
in class AbstractRangeBuilder<RangeAggregatorBuilder,RangeAggregator.Range>
java.io.IOException