Class ParsedStats
- java.lang.Object
-
- org.elasticsearch.search.aggregations.ParsedAggregation
-
- org.elasticsearch.search.aggregations.metrics.ParsedStats
-
- All Implemented Interfaces:
ToXContent
,ToXContentFragment
,Aggregation
,NumericMetricsAggregation
,NumericMetricsAggregation.MultiValue
,Stats
- Direct Known Subclasses:
ParsedExtendedStats
,ParsedStatsBucket
public class ParsedStats extends ParsedAggregation implements Stats
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation
Aggregation.CommonFields
-
Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.metrics.NumericMetricsAggregation
NumericMetricsAggregation.MultiValue, NumericMetricsAggregation.SingleValue
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
Fields Modifier and Type Field Description protected double
avg
protected long
count
protected double
max
protected double
min
protected double
sum
protected java.util.Map<java.lang.String,java.lang.String>
valueAsString
-
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.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description ParsedStats()
-
Method Summary
Modifier and Type Method Description protected static void
declareStatsFields(ObjectParser<? extends ParsedStats,java.lang.Void> objectParser)
protected XContentBuilder
doXContentBody(XContentBuilder builder, ToXContent.Params params)
static ParsedStats
fromXContent(XContentParser parser, java.lang.String name)
double
getAvg()
java.lang.String
getAvgAsString()
long
getCount()
double
getMax()
java.lang.String
getMaxAsString()
double
getMin()
java.lang.String
getMinAsString()
double
getSum()
java.lang.String
getSumAsString()
java.lang.String
getType()
protected XContentBuilder
otherStatsToXContent(XContentBuilder builder, ToXContent.Params params)
-
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.search.aggregations.Aggregation
getMetaData, getName
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
toXContent
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Method Detail
-
getCount
public long getCount()
-
getMin
public double getMin()
-
getMax
public double getMax()
-
getAvg
public double getAvg()
-
getSum
public double getSum()
-
getMinAsString
public java.lang.String getMinAsString()
- Specified by:
getMinAsString
in interfaceStats
- Returns:
- The minimum value of all aggregated values as a String.
-
getMaxAsString
public java.lang.String getMaxAsString()
- Specified by:
getMaxAsString
in interfaceStats
- Returns:
- The maximum value of all aggregated values as a String.
-
getAvgAsString
public java.lang.String getAvgAsString()
- Specified by:
getAvgAsString
in interfaceStats
- Returns:
- The avg value over all aggregated values as a String.
-
getSumAsString
public java.lang.String getSumAsString()
- Specified by:
getSumAsString
in interfaceStats
- Returns:
- The sum of aggregated values as a String.
-
getType
public java.lang.String getType()
- Specified by:
getType
in interfaceAggregation
- Returns:
- a string representing the type of the aggregation. This type is added to the aggregation name in the response, so that it can later be used by clients to determine type of the aggregation and parse it into the proper object.
-
doXContentBody
protected XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
doXContentBody
in classParsedAggregation
- Throws:
java.io.IOException
-
declareStatsFields
protected static void declareStatsFields(ObjectParser<? extends ParsedStats,java.lang.Void> objectParser)
-
fromXContent
public static ParsedStats fromXContent(XContentParser parser, java.lang.String name)
-
otherStatsToXContent
protected XContentBuilder otherStatsToXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Throws:
java.io.IOException
-
-