public final class IpRangeAggregationBuilder extends ValuesSourceAggregationBuilder<ValuesSource.Bytes,IpRangeAggregationBuilder>
Modifier and Type | Class and Description |
---|---|
static class |
IpRangeAggregationBuilder.Range |
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 |
---|---|
static java.lang.String |
NAME |
config
metaData
factoriesBuilder, name
EMPTY_PARAMS
Constructor and Description |
---|
IpRangeAggregationBuilder(StreamInput in) |
IpRangeAggregationBuilder(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
IpRangeAggregationBuilder |
addMaskRange(java.lang.String mask)
Same as
addMaskRange(String, String) but uses the mask itself as
a key. |
IpRangeAggregationBuilder |
addMaskRange(java.lang.String key,
java.lang.String mask)
Add a new range to this aggregation using the CIDR notation.
|
IpRangeAggregationBuilder |
addRange(IpRangeAggregationBuilder.Range range)
Add a new
IpRangeAggregationBuilder.Range to this aggregation. |
IpRangeAggregationBuilder |
addRange(java.lang.String from,
java.lang.String to)
Same as
addRange(String, String, String) but the key will be
automatically generated. |
IpRangeAggregationBuilder |
addRange(java.lang.String key,
java.lang.String from,
java.lang.String to)
Add a new range to this aggregation.
|
IpRangeAggregationBuilder |
addUnboundedFrom(java.lang.String from)
Same as
addUnboundedFrom(String, String) but the key will be
generated automatically. |
IpRangeAggregationBuilder |
addUnboundedFrom(java.lang.String key,
java.lang.String from)
Same as
addRange(String, String, String) but there will be no
upper bound. |
IpRangeAggregationBuilder |
addUnboundedTo(java.lang.String to)
Same as
addUnboundedTo(String, String) but the key will be
generated automatically. |
IpRangeAggregationBuilder |
addUnboundedTo(java.lang.String key,
java.lang.String to)
Same as
addRange(String, String, String) but there will be no
lower bound. |
protected XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
java.util.List<IpRangeAggregationBuilder.Range> |
getRanges()
Get the current list or ranges that are configured on this aggregation.
|
java.lang.String |
getType()
The name of the type of aggregation built by this builder.
|
protected ValuesSourceAggregatorFactory<ValuesSource.Bytes,?> |
innerBuild(SearchContext context,
ValuesSourceConfig<ValuesSource.Bytes> config,
AggregatorFactory<?> parent,
AggregatorFactories.Builder subFactoriesBuilder) |
protected boolean |
innerEquals(java.lang.Object obj) |
protected int |
innerHashCode() |
protected void |
innerWriteTo(StreamOutput out)
Write subclass's state to the stream.
|
boolean |
keyed() |
IpRangeAggregationBuilder |
keyed(boolean keyed) |
static AggregationBuilder |
parse(java.lang.String aggregationName,
QueryParseContext context) |
IpRangeAggregationBuilder |
script(Script script)
Sets the script to use for this aggregation.
|
doBuild, doEquals, doHashCode, doWriteTo, field, field, format, format, internalXContent, missing, missing, resolveConfig, 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
public static final java.lang.String NAME
public IpRangeAggregationBuilder(java.lang.String name)
public IpRangeAggregationBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
public static AggregationBuilder parse(java.lang.String aggregationName, QueryParseContext context) throws java.io.IOException
java.io.IOException
public java.lang.String getType()
BaseAggregationBuilder
public IpRangeAggregationBuilder keyed(boolean keyed)
public boolean keyed()
public java.util.List<IpRangeAggregationBuilder.Range> getRanges()
public IpRangeAggregationBuilder addRange(IpRangeAggregationBuilder.Range range)
IpRangeAggregationBuilder.Range
to this aggregation.public IpRangeAggregationBuilder addRange(java.lang.String key, java.lang.String from, java.lang.String 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 IpRangeAggregationBuilder addMaskRange(java.lang.String key, java.lang.String mask)
public IpRangeAggregationBuilder addMaskRange(java.lang.String mask)
addMaskRange(String, String)
but uses the mask itself as
a key.public IpRangeAggregationBuilder addRange(java.lang.String from, java.lang.String to)
addRange(String, String, String)
but the key will be
automatically generated.public IpRangeAggregationBuilder addUnboundedTo(java.lang.String key, java.lang.String to)
addRange(String, String, String)
but there will be no
lower bound.public IpRangeAggregationBuilder addUnboundedTo(java.lang.String to)
addUnboundedTo(String, String)
but the key will be
generated automatically.public IpRangeAggregationBuilder addUnboundedFrom(java.lang.String key, java.lang.String from)
addRange(String, String, String)
but there will be no
upper bound.public IpRangeAggregationBuilder script(Script script)
ValuesSourceAggregationBuilder
script
in class ValuesSourceAggregationBuilder<ValuesSource.Bytes,IpRangeAggregationBuilder>
public IpRangeAggregationBuilder addUnboundedFrom(java.lang.String from)
addUnboundedFrom(String, String)
but the key will be
generated automatically.protected void innerWriteTo(StreamOutput out) throws java.io.IOException
ValuesSourceAggregationBuilder
innerWriteTo
in class ValuesSourceAggregationBuilder<ValuesSource.Bytes,IpRangeAggregationBuilder>
java.io.IOException
protected ValuesSourceAggregatorFactory<ValuesSource.Bytes,?> innerBuild(SearchContext context, ValuesSourceConfig<ValuesSource.Bytes> config, AggregatorFactory<?> parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException
innerBuild
in class ValuesSourceAggregationBuilder<ValuesSource.Bytes,IpRangeAggregationBuilder>
java.io.IOException
protected XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContentBody
in class ValuesSourceAggregationBuilder<ValuesSource.Bytes,IpRangeAggregationBuilder>
java.io.IOException
protected int innerHashCode()
innerHashCode
in class ValuesSourceAggregationBuilder<ValuesSource.Bytes,IpRangeAggregationBuilder>
protected boolean innerEquals(java.lang.Object obj)
innerEquals
in class ValuesSourceAggregationBuilder<ValuesSource.Bytes,IpRangeAggregationBuilder>