Class DocValuesAcc

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public abstract class DocValuesAcc
    extends SlotAcc
    Accumulates stats separated by slot number for the fields with DocValues
    • Method Detail

      • collect

        public void collect​(int doc,
                            int slot,
                            IntFunction<SlotAcc.SlotContext> slotContext)
                     throws IOException
        Description copied from class: SlotAcc
        All subclasses must override this method to collect documents. This method is called by the default impl of SlotAcc.collect(DocSet, int, IntFunction) but it's also neccessary if this accumulator is used for sorting.
        Specified by:
        collect in class SlotAcc
        doc - Single Segment docId (relative to the current LeafReaderContext to collect
        slot - The slot number to collect this document in
        slotContext - A callback that can be used for Accumulators that would like additional info about the current slot -- the IntFunction is only garunteed to be valid for the current slot, and the SlotAcc.SlotContext returned is only valid for the duration of the collect() call.
      • collectValues

        protected abstract void collectValues​(int doc,
                                              int slot)
                                       throws IOException
      • advanceExact

        protected abstract boolean advanceExact​(int doc)
                                         throws IOException
        Wrapper to org.apache.lucene.index.DocValuesIterator#advanceExact(int) returns whether or not given doc has value