public abstract class AbstractRangeBuilder<AB extends AbstractRangeBuilder<AB,R>,R extends RangeAggregator.Range> extends ValuesSourceAggregationBuilder<ValuesSource.Numeric,AB>
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 boolean |
keyed |
protected InternalRange.Factory<?,?> |
rangeFactory |
protected java.util.List<R> |
ranges |
config
metaData
factoriesBuilder, name
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
AbstractRangeBuilder(StreamInput in,
InternalRange.Factory<?,?> rangeFactory,
Writeable.Reader<R> rangeReader)
Read from a stream.
|
protected |
AbstractRangeBuilder(java.lang.String name,
InternalRange.Factory<?,?> rangeFactory) |
Modifier and Type | Method and Description |
---|---|
AB |
addRange(R range) |
protected XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
protected boolean |
innerEquals(java.lang.Object obj) |
protected int |
innerHashCode() |
protected void |
innerWriteTo(StreamOutput out)
Write subclass's state to the stream.
|
boolean |
keyed() |
AB |
keyed(boolean keyed) |
protected RangeAggregator.Range[] |
processRanges(SearchContext context,
ValuesSourceConfig<ValuesSource.Numeric> config)
Resolve any strings in the ranges so we have a number value for the from
and to of each range.
|
java.util.List<R> |
ranges() |
doBuild, doEquals, doHashCode, doWriteTo, field, field, format, format, innerBuild, internalXContent, missing, missing, resolveConfig, script, script, serializeTargetValueType, timeZone, timeZone, valueType, valueType
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 final InternalRange.Factory<?,?> rangeFactory
protected java.util.List<R extends RangeAggregator.Range> ranges
protected boolean keyed
protected AbstractRangeBuilder(java.lang.String name, InternalRange.Factory<?,?> rangeFactory)
protected AbstractRangeBuilder(StreamInput in, InternalRange.Factory<?,?> rangeFactory, Writeable.Reader<R> rangeReader) throws java.io.IOException
java.io.IOException
protected RangeAggregator.Range[] processRanges(SearchContext context, ValuesSourceConfig<ValuesSource.Numeric> config)
protected void innerWriteTo(StreamOutput out) throws java.io.IOException
ValuesSourceAggregationBuilder
innerWriteTo
in class ValuesSourceAggregationBuilder<ValuesSource.Numeric,AB extends AbstractRangeBuilder<AB,R>>
java.io.IOException
public java.util.List<R> ranges()
public AB keyed(boolean keyed)
public boolean keyed()
protected XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContentBody
in class ValuesSourceAggregationBuilder<ValuesSource.Numeric,AB extends AbstractRangeBuilder<AB,R>>
java.io.IOException
protected int innerHashCode()
innerHashCode
in class ValuesSourceAggregationBuilder<ValuesSource.Numeric,AB extends AbstractRangeBuilder<AB,R>>
protected boolean innerEquals(java.lang.Object obj)
innerEquals
in class ValuesSourceAggregationBuilder<ValuesSource.Numeric,AB extends AbstractRangeBuilder<AB,R>>