Class ParsedStringStats
java.lang.Object
org.elasticsearch.search.aggregations.ParsedAggregation
org.elasticsearch.client.analytics.ParsedStringStats
- All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentFragment
,org.elasticsearch.search.aggregations.Aggregation
public class ParsedStringStats
extends org.elasticsearch.search.aggregations.ParsedAggregation
Results from the
string_stats
aggregation.-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description static org.elasticsearch.common.xcontent.ConstructingObjectParser<ParsedStringStats,java.lang.String>
PARSER
-
Method Summary
Modifier and Type Method Description protected org.elasticsearch.common.xcontent.XContentBuilder
doXContentBody(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
double
getAvgLength()
The average length computed over all terms.long
getCount()
The number of non-empty fields counted.java.util.Map<java.lang.String,java.lang.Double>
getDistribution()
The probability distribution for all characters.double
getEntropy()
The Shannon Entropy value computed over all terms collected by the aggregation.int
getMaxLength()
The length of the longest term.int
getMinLength()
The length of the shortest term.java.lang.String
getType()
Methods inherited from class org.elasticsearch.search.aggregations.ParsedAggregation
declareAggregationFields, getMetadata, getName, parseDouble, setName, toXContent
-
Field Details
-
PARSER
public static final org.elasticsearch.common.xcontent.ConstructingObjectParser<ParsedStringStats,java.lang.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
public java.util.Map<java.lang.String,java.lang.Double> getDistribution()The probability distribution for all characters.null
unless explicitly requested withStringStatsAggregationBuilder.showDistribution(boolean)
. -
getType
public java.lang.String getType() -
doXContentBody
protected org.elasticsearch.common.xcontent.XContentBuilder doXContentBody(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
doXContentBody
in classorg.elasticsearch.search.aggregations.ParsedAggregation
- Throws:
java.io.IOException
-