Class DocValuesStats.NumericDocValuesStats<T extends java.lang.Number>

    • Field Detail

      • mean

        protected double mean
      • variance

        protected double variance
    • Constructor Detail

      • NumericDocValuesStats

        protected NumericDocValuesStats​(java.lang.String field,
                                        T initialMin,
                                        T initialMax)
    • Method Detail

      • init

        protected final boolean init​(LeafReaderContext context)
                              throws java.io.IOException
        Description copied from class: DocValuesStats
        Initializes 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:
        init in class DocValuesStats<T extends java.lang.Number>
        Throws:
        java.io.IOException
      • hasValue

        protected final boolean hasValue​(int doc)
                                  throws java.io.IOException
        Description copied from class: DocValuesStats
        Returns whether the given document has a value for the requested DocValues field.
        Specified by:
        hasValue in class DocValuesStats<T extends java.lang.Number>
        Throws:
        java.io.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.
      • sum

        public abstract T sum()
        Returns the sum of values of the field. Note that if the values are large, the sum might overflow.