Class AbstractFieldComparator

    • Field Detail

      • starts

        protected int[] starts
        The document number starts for the readers.
    • Constructor Detail

      • AbstractFieldComparator

        protected AbstractFieldComparator​(int numHits)
        Create a new instance with the given number of values.
        Parameters:
        numHits - the number of values
    • Method Detail

      • readerIndex

        protected final int readerIndex​(int n)
        Returns the reader index for document n.
        Parameters:
        n - document number.
        Returns:
        the reader index.
      • setValue

        public void setValue​(int slot,
                             Comparable<?> value)
        Add the given value to the values array
        Specified by:
        setValue in class FieldComparatorBase
        Parameters:
        slot - index into values
        value - value for adding
      • getValue

        public Comparable<?> getValue​(int slot)
        Return a value from the values array
        Specified by:
        getValue in class FieldComparatorBase
        Parameters:
        slot - index to retrieve
        Returns:
        the retrieved value