NamedWriteable
, Writeable
, ToXContent
, ToXContentFragment
, BaseAggregationBuilder
public final class IpRangeAggregationBuilder extends ValuesSourceAggregationBuilder<ValuesSource.Bytes,IpRangeAggregationBuilder>
Modifier and Type | Class | Description |
---|---|---|
static class |
IpRangeAggregationBuilder.Range |
AggregationBuilder.CommonFields
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
ValuesSourceAggregationBuilder.LeafOnly<VS extends ValuesSource,AB extends ValuesSourceAggregationBuilder<VS,AB>>
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
NAME |
metaData
factoriesBuilder, name
EMPTY_PARAMS
config
Modifier | Constructor | Description |
---|---|---|
|
IpRangeAggregationBuilder(java.lang.String name) |
|
|
IpRangeAggregationBuilder(StreamInput in) |
|
protected |
IpRangeAggregationBuilder(IpRangeAggregationBuilder clone,
AggregatorFactories.Builder factoriesBuilder,
java.util.Map<java.lang.String,java.lang.Object> metaData) |
Modifier and Type | Method | 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(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 |
addRange(IpRangeAggregationBuilder.Range range) |
Add a new
IpRangeAggregationBuilder.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,
XContentParser parser) |
|
IpRangeAggregationBuilder |
script(Script script) |
Sets the script to use for this aggregation.
|
protected AggregationBuilder |
shallowCopy(AggregatorFactories.Builder factoriesBuilder,
java.util.Map<java.lang.String,java.lang.Object> metaData) |
Create a shallow copy of this builder and replacing
AggregationBuilder.factoriesBuilder and metaData . |
build, equals, getMetaData, getWriteableName, hashCode, setMetaData, subAggregation, subAggregation, subAggregations, toXContent, writeTo
doRewrite, getName, getPipelineAggregations, getSubAggregations, rewrite, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isFragment
doBuild, doEquals, doHashCode, doWriteTo, field, field, format, format, internalXContent, missing, missing, resolveConfig, script, serializeTargetValueType, timeZone, timeZone, valueType, valueType
public static final java.lang.String NAME
public IpRangeAggregationBuilder(java.lang.String name)
protected IpRangeAggregationBuilder(IpRangeAggregationBuilder clone, AggregatorFactories.Builder factoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metaData)
public IpRangeAggregationBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
public static AggregationBuilder parse(java.lang.String aggregationName, XContentParser parser) throws java.io.IOException
java.io.IOException
protected AggregationBuilder shallowCopy(AggregatorFactories.Builder factoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metaData)
AggregationBuilder
AggregationBuilder.factoriesBuilder
and metaData
.
Used by AggregationBuilder.rewrite(QueryRewriteContext)
.shallowCopy
in class AggregationBuilder
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>