Package org.apache.lucene.misc.search
Class DocValuesStats.SortedNumericDocValuesStats<T extends Number>
java.lang.Object
org.apache.lucene.misc.search.DocValuesStats<T>
org.apache.lucene.misc.search.DocValuesStats.SortedNumericDocValuesStats<T>
- Direct Known Subclasses:
DocValuesStats.SortedDoubleDocValuesStats,DocValuesStats.SortedLongDocValuesStats
- Enclosing class:
DocValuesStats<T>
public abstract static class DocValuesStats.SortedNumericDocValuesStats<T extends Number>
extends DocValuesStats<T>
Holds statistics for a sorted-numeric DocValues field.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.misc.search.DocValuesStats
DocValuesStats.DoubleDocValuesStats, DocValuesStats.LongDocValuesStats, DocValuesStats.NumericDocValuesStats<T extends Number>, DocValuesStats.SortedDocValuesStats, DocValuesStats.SortedDoubleDocValuesStats, DocValuesStats.SortedLongDocValuesStats, DocValuesStats.SortedNumericDocValuesStats<T extends Number>, DocValuesStats.SortedSetDocValuesStats -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleprotected SortedNumericDocValuesprotected longprotected doubleFields inherited from class org.apache.lucene.misc.search.DocValuesStats
field, max, min -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSortedNumericDocValuesStats(String field, T initialMin, T initialMax) -
Method Summary
Modifier and TypeMethodDescriptionprotected final booleanhasValue(int doc) Returns whether the given document has a value for the requested DocValues field.protected final booleaninit(LeafReaderContext context) Initializes this object with the given reader context.final doublemean()The mean of all values of the field.final doublestdev()Returns the stdev of all values of the field.abstract Tsum()Returns the sum of values of the field.final longReturns the total number of values for this field.final doublevariance()Returns the variance of all values of the field.Methods inherited from class org.apache.lucene.misc.search.DocValuesStats
count, doAccumulate, field, max, min, missing
-
Field Details
-
valuesCount
protected long valuesCount -
mean
protected double mean -
variance
protected double variance -
sndv
-
-
Constructor Details
-
SortedNumericDocValuesStats
-
-
Method Details
-
init
Description copied from class:DocValuesStatsInitializes this object with the given reader context. Returns whether stats can be computed for this segment (i.e. it does have the requested DocValues field).- Specified by:
initin classDocValuesStats<T extends Number>- Throws:
IOException
-
hasValue
Description copied from class:DocValuesStatsReturns whether the given document has a value for the requested DocValues field.- Specified by:
hasValuein classDocValuesStats<T extends Number>- Throws:
IOException
-
mean
public final double mean()The mean of all values of the field. -
variance
public final double variance()Returns the variance of all values of the field. -
stdev
public final double stdev()Returns the stdev of all values of the field. -
valuesCount
public final long valuesCount()Returns the total number of values for this field. -
sum
Returns the sum of values of the field. Note that if the values are large, thesummight overflow.
-