Class DocValuesStats<T>

    • Field Detail

      • missing

        private int missing
      • count

        private int count
      • field

        protected final java.lang.String field
      • min

        protected T min
      • max

        protected T max
    • Constructor Detail

      • DocValuesStats

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

      • doAccumulate

        protected abstract void doAccumulate​(int count)
                                      throws java.io.IOException
        Called after accumulate(int) was processed and verified that the document has a value for the field. Implementations should update the statistics based on the value of the current document.
        Parameters:
        count - the updated number of documents with value for this field.
        Throws:
        java.io.IOException
      • init

        protected abstract boolean init​(LeafReaderContext context)
                                 throws java.io.IOException
        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).
        Throws:
        java.io.IOException
      • hasValue

        protected abstract boolean hasValue​(int doc)
                                     throws java.io.IOException
        Returns whether the given document has a value for the requested DocValues field.
        Throws:
        java.io.IOException
      • accumulate

        final void accumulate​(int doc)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • addMissing

        final void addMissing()
      • field

        public final java.lang.String field()
        The field for which these stats were computed.
      • count

        public final int count()
        The number of documents which have a value of the field.
      • missing

        public final int missing()
        The number of documents which do not have a value of the field.
      • min

        public final T min()
        The minimum value of the field. Undefined when count() is zero.
      • max

        public final T max()
        The maximum value of the field. Undefined when count() is zero.