- All Implemented Interfaces:
- NamedWriteable,- Writeable,- Aggregation,- NumericMetricsAggregation,- NumericMetricsAggregation.SingleValue,- ToXContent,- ToXContentFragment
- 
Nested Class SummaryNested classes/interfaces inherited from class org.elasticsearch.search.aggregations.metrics.InternalNumericMetricsAggregationInternalNumericMetricsAggregation.MultiValue, InternalNumericMetricsAggregation.SingleValueNested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.AggregationAggregation.CommonFieldsNested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.metrics.NumericMetricsAggregationNumericMetricsAggregation.MultiValue, NumericMetricsAggregation.SingleValueNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContentToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.WriteableWriteable.Reader<V>, Writeable.Writer<V>
- 
Field SummaryFields inherited from class org.elasticsearch.search.aggregations.metrics.InternalNumericMetricsAggregationformatFields inherited from class org.elasticsearch.search.aggregations.InternalAggregationmetadata, nameFields inherited from interface org.elasticsearch.search.aggregations.AggregationTYPED_KEYS_DELIMITERFields inherited from interface org.elasticsearch.xcontent.ToXContentEMPTY_PARAMS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voiddoWriteTo(StreamOutput out) doXContentBody(XContentBuilder builder, ToXContent.Params params) booleanfinalizeSampling(SamplingContext samplingContext) Called by the parent sampling context.Returns the name of the writeable objectinthashCode()reduce(List<InternalAggregation> aggregations, AggregationReduceContext reduceContext) Reduces the given aggregations to a single one and returns it.doublevalue()Methods inherited from class org.elasticsearch.search.aggregations.metrics.InternalNumericMetricsAggregation.SingleValuegetProperty, getValueAsString, sortValueMethods inherited from class org.elasticsearch.search.aggregations.metrics.InternalNumericMetricsAggregationmustReduceOnSingleInternalAgg, sortValueMethods inherited from class org.elasticsearch.search.aggregations.InternalAggregationcopyWithRewritenBuckets, forEachBucket, getMetadata, getName, getProperty, getType, isMapped, readSize, reducePipelines, toString, toXContent, writeSize, writeToMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.search.aggregations.AggregationgetMetadata, getName, getTypeMethods inherited from interface org.elasticsearch.xcontent.ToXContenttoXContentMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragmentisFragment
- 
Constructor Details- 
Sum
- 
SumRead from a stream.- Throws:
- IOException
 
 
- 
- 
Method Details- 
doWriteTo- Specified by:
- doWriteToin class- InternalAggregation
- Throws:
- IOException
 
- 
getWriteableNameDescription copied from interface:NamedWriteableReturns the name of the writeable object
- 
valuepublic double value()
- 
reduceDescription copied from class:InternalAggregationReduces the given aggregations to a single one and returns it. In most cases, the assumption will be the all given aggregations are of the same type (the same type as this aggregation). For best efficiency, when implementing, try reusing an existing instance (typically the first in the given list) to save on redundant object construction.- Specified by:
- reducein class- InternalAggregation
- See Also:
 
- 
finalizeSamplingDescription copied from class:InternalAggregationCalled by the parent sampling context. Should only ever be called once as some aggregations scale their internal values- Overrides:
- finalizeSamplingin class- InternalAggregation
- Parameters:
- samplingContext- the current sampling context
- Returns:
- new aggregation with the sampling context applied, could be the same aggregation instance if nothing needs to be done
 
- 
doXContentBodypublic XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
- doXContentBodyin class- InternalAggregation
- Throws:
- IOException
 
- 
hashCodepublic int hashCode()- Overrides:
- hashCodein class- InternalNumericMetricsAggregation
 
- 
equals- Overrides:
- equalsin class- InternalNumericMetricsAggregation
 
 
-