Class StringStatsAggregationBuilder
java.lang.Object
org.elasticsearch.search.aggregations.AggregationBuilder
org.elasticsearch.search.aggregations.AbstractAggregationBuilder<AB>
org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder<StringStatsAggregationBuilder>
org.elasticsearch.client.analytics.StringStatsAggregationBuilder
- All Implemented Interfaces:
NamedWriteable
,Writeable
,ToXContent
,ToXContentFragment
,BaseAggregationBuilder
public class StringStatsAggregationBuilder extends ValuesSourceAggregationBuilder<StringStatsAggregationBuilder>
Builds the
string_stats
aggregation request.
NOTE: This extends AbstractAggregationBuilder for compatibility
with SearchSourceBuilder.aggregation(AggregationBuilder)
but it
doesn't support any "server" side things like
Writeable.writeTo(StreamOutput),
AggregationBuilder.rewrite(QueryRewriteContext), or
AbstractAggregationBuilder.build(QueryShardContext, AggregatorFactory).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder
ValuesSourceAggregationBuilder.LeafOnly<VS extends ValuesSource,AB extends ValuesSourceAggregationBuilder<AB>>
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
AggregationBuilder.BucketCardinality, AggregationBuilder.CommonFields
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V extends java.lang.Object>, Writeable.Writer<V extends java.lang.Object>
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NAME
Fields inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder
config
Fields inherited from class org.elasticsearch.search.aggregations.AbstractAggregationBuilder
metadata
Fields inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
factoriesBuilder, name
-
Constructor Summary
Constructors Constructor Description StringStatsAggregationBuilder(java.lang.String name)
-
Method Summary
Modifier and Type Method Description AggregationBuilder.BucketCardinality
bucketCardinality()
protected ValuesSourceType
defaultValueSourceType()
XContentBuilder
doXContentBody(XContentBuilder builder, ToXContent.Params params)
boolean
equals(java.lang.Object obj)
java.lang.String
getType()
int
hashCode()
protected ValuesSourceAggregatorFactory
innerBuild(QueryShardContext queryShardContext, ValuesSourceConfig config, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder)
protected void
innerWriteTo(StreamOutput out)
protected AggregationBuilder
shallowCopy(AggregatorFactories.Builder factoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metadata)
StringStatsAggregationBuilder
showDistribution(boolean showDistribution)
Compute the distribution of each character.Methods inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder
declareFields, doBuild, doWriteTo, field, field, format, format, internalXContent, missing, missing, resolveConfig, script, script, serializeTargetValueType, timeZone, timeZone, userValueTypeHint, userValueTypeHint
Methods inherited from class org.elasticsearch.search.aggregations.AbstractAggregationBuilder
build, getMetadata, getWriteableName, setMetadata, subAggregation, subAggregation, subAggregations, toXContent, writeTo
Methods inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
buildPipelineTree, doRewrite, getName, getPipelineAggregations, getSubAggregations, rewrite, toString
-
Field Details
-
NAME
public static final java.lang.String NAME- See Also:
- Constant Field Values
-
-
Constructor Details
-
StringStatsAggregationBuilder
public StringStatsAggregationBuilder(java.lang.String name)
-
-
Method Details
-
showDistribution
Compute the distribution of each character. Disabled by default.- Returns:
- this for chaining
-
defaultValueSourceType
- Specified by:
defaultValueSourceType
in classValuesSourceAggregationBuilder<StringStatsAggregationBuilder>
-
getType
public java.lang.String getType() -
doXContentBody
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
doXContentBody
in classValuesSourceAggregationBuilder<StringStatsAggregationBuilder>
- Throws:
java.io.IOException
-
innerWriteTo
- Specified by:
innerWriteTo
in classValuesSourceAggregationBuilder<StringStatsAggregationBuilder>
- Throws:
java.io.IOException
-
bucketCardinality
- Specified by:
bucketCardinality
in classAggregationBuilder
-
innerBuild
protected ValuesSourceAggregatorFactory innerBuild(QueryShardContext queryShardContext, ValuesSourceConfig config, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException- Specified by:
innerBuild
in classValuesSourceAggregationBuilder<StringStatsAggregationBuilder>
- Throws:
java.io.IOException
-
shallowCopy
protected AggregationBuilder shallowCopy(AggregatorFactories.Builder factoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metadata)- Specified by:
shallowCopy
in classAggregationBuilder
-
hashCode
public int hashCode()- Overrides:
hashCode
in classValuesSourceAggregationBuilder<StringStatsAggregationBuilder>
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classValuesSourceAggregationBuilder<StringStatsAggregationBuilder>
-