Class FieldComparatorSource


  • public abstract class FieldComparatorSource
    extends Object
    Provides a FieldComparator for custom field sorting.
    • Constructor Detail

      • FieldComparatorSource

        public FieldComparatorSource()
    • Method Detail

      • newComparator

        public abstract FieldComparator<?> newComparator​(String fieldname,
                                                         int numHits,
                                                         int sortPos,
                                                         boolean reversed)
                                                  throws IOException
        Creates a comparator for the field in the given index.
        Parameters:
        fieldname - Name of the field to create comparator for.
        Returns:
        FieldComparator.
        Throws:
        IOException - If an error occurs reading the index.