Class InternalMatrixStats
java.lang.Object
org.elasticsearch.search.aggregations.InternalAggregation
org.elasticsearch.search.aggregations.matrix.stats.InternalMatrixStats
- All Implemented Interfaces:
NamedWriteable,Writeable,ToXContent,ToXContentFragment,Aggregation,MatrixStats
public class InternalMatrixStats extends InternalAggregation implements MatrixStats
Computes distribution statistics over multiple fields
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalAggregation
InternalAggregation.ReduceContextNested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation
Aggregation.CommonFieldsNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V extends java.lang.Object>, Writeable.Writer<V extends java.lang.Object> -
Field Summary
Fields inherited from class org.elasticsearch.search.aggregations.InternalAggregation
metaData, nameFields inherited from interface org.elasticsearch.search.aggregations.Aggregation
TYPED_KEYS_DELIMITER -
Constructor Summary
Constructors Constructor Description InternalMatrixStats(StreamInput in)Read from a stream. -
Method Summary
Modifier and Type Method Description protected voiddoWriteTo(StreamOutput out)XContentBuilderdoXContentBody(XContentBuilder builder, ToXContent.Params params)booleanequals(java.lang.Object obj)doublegetCorrelation(java.lang.String fieldX, java.lang.String fieldY)get the correlation between the two fieldsdoublegetCovariance(java.lang.String fieldX, java.lang.String fieldY)get the covariance between the two fieldslonggetDocCount()get the number of documentslonggetFieldCount(java.lang.String field)get the number of samples for the given field.doublegetKurtosis(java.lang.String field)get the distribution shape for the given fielddoublegetMean(java.lang.String field)get the mean for the given fieldjava.lang.ObjectgetProperty(java.util.List<java.lang.String> path)doublegetSkewness(java.lang.String field)get the distribution skewness for the given fielddoublegetVariance(java.lang.String field)get the variance for the given fieldjava.lang.StringgetWriteableName()inthashCode()InternalAggregationreduce(java.util.List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)Methods inherited from class org.elasticsearch.search.aggregations.InternalAggregation
getMetaData, getName, getProperty, getType, isMapped, pipelineAggregators, readSize, reducePipelines, toString, toXContent, writeSize, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.search.aggregations.Aggregation
getMetaData, getName, getType
-
Constructor Details
-
InternalMatrixStats
Read from a stream.- Throws:
java.io.IOException
-
-
Method Details
-
doWriteTo
- Specified by:
doWriteToin classInternalAggregation- Throws:
java.io.IOException
-
getWriteableName
public java.lang.String getWriteableName()- Specified by:
getWriteableNamein interfaceNamedWriteable
-
getDocCount
public long getDocCount()get the number of documents- Specified by:
getDocCountin interfaceMatrixStats
-
getFieldCount
public long getFieldCount(java.lang.String field)get the number of samples for the given field. == docCount - numMissing- Specified by:
getFieldCountin interfaceMatrixStats
-
getMean
public double getMean(java.lang.String field)get the mean for the given field- Specified by:
getMeanin interfaceMatrixStats
-
getVariance
public double getVariance(java.lang.String field)get the variance for the given field- Specified by:
getVariancein interfaceMatrixStats
-
getSkewness
public double getSkewness(java.lang.String field)get the distribution skewness for the given field- Specified by:
getSkewnessin interfaceMatrixStats
-
getKurtosis
public double getKurtosis(java.lang.String field)get the distribution shape for the given field- Specified by:
getKurtosisin interfaceMatrixStats
-
getCovariance
public double getCovariance(java.lang.String fieldX, java.lang.String fieldY)get the covariance between the two fields- Specified by:
getCovariancein interfaceMatrixStats
-
getCorrelation
public double getCorrelation(java.lang.String fieldX, java.lang.String fieldY)get the correlation between the two fields- Specified by:
getCorrelationin interfaceMatrixStats
-
doXContentBody
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
doXContentBodyin classInternalAggregation- Throws:
java.io.IOException
-
getProperty
public java.lang.Object getProperty(java.util.List<java.lang.String> path)- Specified by:
getPropertyin classInternalAggregation
-
reduce
public InternalAggregation reduce(java.util.List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)- Specified by:
reducein classInternalAggregation
-
hashCode
public int hashCode()- Overrides:
hashCodein classInternalAggregation
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classInternalAggregation
-