Class InternalMatrixStats
java.lang.Object
org.elasticsearch.search.aggregations.InternalAggregation
org.elasticsearch.search.aggregations.matrix.stats.InternalMatrixStats
- All Implemented Interfaces:
NamedWriteable
,Writeable
,Aggregation
,MatrixStats
,org.elasticsearch.xcontent.ToXContent
,org.elasticsearch.xcontent.ToXContentFragment
Computes distribution statistics over multiple fields
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalAggregation
InternalAggregation.ReduceContext, InternalAggregation.ReduceContextBuilder
Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation
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
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V extends Object>, Writeable.Writer<V extends Object>
-
Field Summary
Fields inherited from class org.elasticsearch.search.aggregations.InternalAggregation
metadata, name
Fields inherited from interface org.elasticsearch.search.aggregations.Aggregation
TYPED_KEYS_DELIMITER
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doWriteTo
(StreamOutput out) org.elasticsearch.xcontent.XContentBuilder
doXContentBody
(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) boolean
double
getCorrelation
(String fieldX, String fieldY) get the correlation between the two fieldsdouble
getCovariance
(String fieldX, String fieldY) get the covariance between the two fieldslong
get the number of documentslong
getFieldCount
(String field) get the number of samples for the given field.double
getKurtosis
(String field) get the distribution shape for the given fielddouble
get the mean for the given fieldgetProperty
(List<String> path) double
getSkewness
(String field) get the distribution skewness for the given fielddouble
getVariance
(String field) get the variance for the given fieldint
hashCode()
protected boolean
reduce
(List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext) Methods inherited from class org.elasticsearch.search.aggregations.InternalAggregation
copyWithRewritenBuckets, forEachBucket, getMetadata, getName, getProperty, getType, isMapped, mergePipelineTreeForBWCSerialization, pipelineAggregatorsForBwcSerialization, readSize, reducePipelines, sortValue, sortValue, toString, toXContent, writeSize, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.search.aggregations.Aggregation
getMetadata, getName, getType
Methods inherited from interface org.elasticsearch.xcontent.ToXContent
toXContent
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
InternalMatrixStats
Read from a stream.- Throws:
IOException
-
-
Method Details
-
doWriteTo
- Specified by:
doWriteTo
in classInternalAggregation
- Throws:
IOException
-
getWriteableName
- Specified by:
getWriteableName
in interfaceNamedWriteable
-
getDocCount
public long getDocCount()get the number of documents- Specified by:
getDocCount
in interfaceMatrixStats
-
getFieldCount
get the number of samples for the given field. == docCount - numMissing- Specified by:
getFieldCount
in interfaceMatrixStats
-
getMean
get the mean for the given field- Specified by:
getMean
in interfaceMatrixStats
-
getVariance
get the variance for the given field- Specified by:
getVariance
in interfaceMatrixStats
-
getSkewness
get the distribution skewness for the given field- Specified by:
getSkewness
in interfaceMatrixStats
-
getKurtosis
get the distribution shape for the given field- Specified by:
getKurtosis
in interfaceMatrixStats
-
getCovariance
get the covariance between the two fields- Specified by:
getCovariance
in interfaceMatrixStats
-
getCorrelation
get the correlation between the two fields- Specified by:
getCorrelation
in interfaceMatrixStats
-
doXContentBody
public org.elasticsearch.xcontent.XContentBuilder doXContentBody(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
doXContentBody
in classInternalAggregation
- Throws:
IOException
-
getProperty
- Specified by:
getProperty
in classInternalAggregation
-
reduce
public InternalAggregation reduce(List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext) - Specified by:
reduce
in classInternalAggregation
-
mustReduceOnSingleInternalAgg
protected boolean mustReduceOnSingleInternalAgg()- Specified by:
mustReduceOnSingleInternalAgg
in classInternalAggregation
-
hashCode
public int hashCode()- Overrides:
hashCode
in classInternalAggregation
-
equals
- Overrides:
equals
in classInternalAggregation
-