Class InternalMatrixStats
java.lang.Object
org.elasticsearch.search.aggregations.InternalAggregation
org.elasticsearch.search.aggregations.matrix.stats.InternalMatrixStats
- All Implemented Interfaces:
org.elasticsearch.common.io.stream.NamedWriteable,org.elasticsearch.common.io.stream.Writeable,org.elasticsearch.search.aggregations.Aggregation,MatrixStats,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentFragment
public class InternalMatrixStats
extends org.elasticsearch.search.aggregations.InternalAggregation
implements MatrixStats
Computes distribution statistics over multiple fields
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalAggregation
org.elasticsearch.search.aggregations.InternalAggregation.ReduceContext, org.elasticsearch.search.aggregations.InternalAggregation.ReduceContextBuilderNested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation
org.elasticsearch.search.aggregations.Aggregation.CommonFieldsNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params -
Field Summary
Fields inherited from class org.elasticsearch.search.aggregations.InternalAggregation
metadata, nameFields inherited from interface org.elasticsearch.search.aggregations.Aggregation
TYPED_KEYS_DELIMITERFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionInternalMatrixStats(org.elasticsearch.common.io.stream.StreamInput in) Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoWriteTo(org.elasticsearch.common.io.stream.StreamOutput out) org.elasticsearch.xcontent.XContentBuilderdoXContentBody(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) booleandoublegetCorrelation(String fieldX, String fieldY) get the correlation between the two fieldsdoublegetCovariance(String fieldX, String fieldY) get the covariance between the two fieldslongget the number of documentslonggetFieldCount(String field) get the number of samples for the given field.doublegetKurtosis(String field) get the distribution shape for the given fielddoubleget the mean for the given fieldgetProperty(List<String> path) doublegetSkewness(String field) get the distribution skewness for the given fielddoublegetVariance(String field) get the variance for the given fieldinthashCode()protected booleanorg.elasticsearch.search.aggregations.InternalAggregationreduce(List<org.elasticsearch.search.aggregations.InternalAggregation> aggregations, org.elasticsearch.search.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, 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, getTypeMethods inherited from interface org.elasticsearch.xcontent.ToXContent
toXContentMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
InternalMatrixStats
Read from a stream.- Throws:
IOException
-
-
Method Details
-
doWriteTo
- Specified by:
doWriteToin classorg.elasticsearch.search.aggregations.InternalAggregation- Throws:
IOException
-
getWriteableName
- Specified by:
getWriteableNamein interfaceorg.elasticsearch.common.io.stream.NamedWriteable
-
getDocCount
public long getDocCount()get the number of documents- Specified by:
getDocCountin interfaceMatrixStats
-
getFieldCount
get the number of samples for the given field. == docCount - numMissing- Specified by:
getFieldCountin interfaceMatrixStats
-
getMean
get the mean for the given field- Specified by:
getMeanin interfaceMatrixStats
-
getVariance
get the variance for the given field- Specified by:
getVariancein interfaceMatrixStats
-
getSkewness
get the distribution skewness for the given field- Specified by:
getSkewnessin interfaceMatrixStats
-
getKurtosis
get the distribution shape for the given field- Specified by:
getKurtosisin interfaceMatrixStats
-
getCovariance
get the covariance between the two fields- Specified by:
getCovariancein interfaceMatrixStats
-
getCorrelation
get the correlation between the two fields- Specified by:
getCorrelationin interfaceMatrixStats
-
doXContentBody
public org.elasticsearch.xcontent.XContentBuilder doXContentBody(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
doXContentBodyin classorg.elasticsearch.search.aggregations.InternalAggregation- Throws:
IOException
-
getProperty
- Specified by:
getPropertyin classorg.elasticsearch.search.aggregations.InternalAggregation
-
reduce
public org.elasticsearch.search.aggregations.InternalAggregation reduce(List<org.elasticsearch.search.aggregations.InternalAggregation> aggregations, org.elasticsearch.search.aggregations.InternalAggregation.ReduceContext reduceContext) - Specified by:
reducein classorg.elasticsearch.search.aggregations.InternalAggregation
-
mustReduceOnSingleInternalAgg
protected boolean mustReduceOnSingleInternalAgg()- Specified by:
mustReduceOnSingleInternalAggin classorg.elasticsearch.search.aggregations.InternalAggregation
-
hashCode
public int hashCode()- Overrides:
hashCodein classorg.elasticsearch.search.aggregations.InternalAggregation
-
equals
- Overrides:
equalsin classorg.elasticsearch.search.aggregations.InternalAggregation
-