Class ParsedStringStats
java.lang.Object
org.elasticsearch.search.aggregations.ParsedAggregation
org.elasticsearch.client.analytics.ParsedStringStats
- All Implemented Interfaces:
org.elasticsearch.search.aggregations.Aggregation
,org.elasticsearch.xcontent.ToXContent
,org.elasticsearch.xcontent.ToXContentFragment
public class ParsedStringStats
extends org.elasticsearch.search.aggregations.ParsedAggregation
Results from the
string_stats
aggregation.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation
org.elasticsearch.search.aggregations.Aggregation.CommonFields
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params
-
Field Summary
Modifier and TypeFieldDescriptionstatic final org.elasticsearch.xcontent.ConstructingObjectParser<ParsedStringStats,
String> Fields inherited from class org.elasticsearch.search.aggregations.ParsedAggregation
metadata
Fields inherited from interface org.elasticsearch.search.aggregations.Aggregation
TYPED_KEYS_DELIMITER
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Method Summary
Modifier and TypeMethodDescriptionprotected org.elasticsearch.xcontent.XContentBuilder
doXContentBody
(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) double
The average length computed over all terms.long
getCount()
The number of non-empty fields counted.The probability distribution for all characters.double
The Shannon Entropy value computed over all terms collected by the aggregation.int
The length of the longest term.int
The length of the shortest term.getType()
Methods inherited from class org.elasticsearch.search.aggregations.ParsedAggregation
declareAggregationFields, getMetadata, getName, parseDouble, setName, toXContent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
PARSER
public static final org.elasticsearch.xcontent.ConstructingObjectParser<ParsedStringStats,String> PARSER
-
-
Method Details
-
getCount
public long getCount()The number of non-empty fields counted. -
getMinLength
public int getMinLength()The length of the shortest term. -
getMaxLength
public int getMaxLength()The length of the longest term. -
getAvgLength
public double getAvgLength()The average length computed over all terms. -
getEntropy
public double getEntropy()The Shannon Entropy value computed over all terms collected by the aggregation. Shannon entropy quantifies the amount of information contained in the field. It is a very useful metric for measuring a wide range of properties of a data set, such as diversity, similarity, randomness etc. -
getDistribution
The probability distribution for all characters.null
unless explicitly requested withStringStatsAggregationBuilder.showDistribution(boolean)
. -
getType
-
doXContentBody
protected org.elasticsearch.xcontent.XContentBuilder doXContentBody(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
doXContentBody
in classorg.elasticsearch.search.aggregations.ParsedAggregation
- Throws:
IOException
-