Class FieldComparatorSource


  • public abstract class FieldComparatorSource
    extends java.lang.Object
    Provides a FieldComparator for custom field sorting.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract FieldComparator<?> newComparator​(java.lang.String fieldname, int numHits, int sortPos, boolean reversed)
      Creates a comparator for the field in the given index.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FieldComparatorSource

        public FieldComparatorSource()
    • Method Detail

      • newComparator

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