Class AbstractFieldComparator

    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator

        org.apache.lucene.search.FieldComparator.ByteComparator, org.apache.lucene.search.FieldComparator.DocComparator, org.apache.lucene.search.FieldComparator.DoubleComparator, org.apache.lucene.search.FieldComparator.FloatComparator, org.apache.lucene.search.FieldComparator.IntComparator, org.apache.lucene.search.FieldComparator.LongComparator, org.apache.lucene.search.FieldComparator.NumericComparator<T extends Number>, org.apache.lucene.search.FieldComparator.RelevanceComparator, org.apache.lucene.search.FieldComparator.ShortComparator, org.apache.lucene.search.FieldComparator.StringComparatorLocale, org.apache.lucene.search.FieldComparator.StringOrdValComparator, org.apache.lucene.search.FieldComparator.StringValComparator
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected List<org.apache.lucene.index.IndexReader> readers
      The index readers.
      protected int[] starts
      The document number starts for the readers.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractFieldComparator​(int numHits)
      Create a new instance with the given number of values.
    • Field Detail

      • readers

        protected final List<org.apache.lucene.index.IndexReader> readers
        The index readers.
      • 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
      • setNextReader

        public void setNextReader​(org.apache.lucene.index.IndexReader reader,
                                  int docBase)
                           throws IOException
        Specified by:
        setNextReader in class org.apache.lucene.search.FieldComparator
        Throws:
        IOException