Class CaseInsensitiveSortComparator


  • public final class CaseInsensitiveSortComparator
    extends org.apache.lucene.search.FieldComparator<org.apache.lucene.util.BytesRef>
    A Lucene SortComparator that will convert field text to lower case effectively rendering all comparisons case insensitive.
    • 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.TermOrdValComparator, org.apache.lucene.search.FieldComparator.TermValComparator
    • Method Detail

      • compare

        public int compare​(int slot1,
                           int slot2)
        Specified by:
        compare in class org.apache.lucene.search.FieldComparator<org.apache.lucene.util.BytesRef>
      • compareBottom

        public int compareBottom​(int doc)
        Specified by:
        compareBottom in class org.apache.lucene.search.FieldComparator<org.apache.lucene.util.BytesRef>
      • copy

        public void copy​(int slot,
                         int doc)
        Specified by:
        copy in class org.apache.lucene.search.FieldComparator<org.apache.lucene.util.BytesRef>
      • setNextReader

        public org.apache.lucene.search.FieldComparator<org.apache.lucene.util.BytesRef> setNextReader​(org.apache.lucene.index.AtomicReaderContext context)
                                                                                                throws IOException
        Specified by:
        setNextReader in class org.apache.lucene.search.FieldComparator<org.apache.lucene.util.BytesRef>
        Throws:
        IOException
      • setBottom

        public void setBottom​(int bottom)
        Specified by:
        setBottom in class org.apache.lucene.search.FieldComparator<org.apache.lucene.util.BytesRef>
      • value

        public org.apache.lucene.util.BytesRef value​(int slot)
        Specified by:
        value in class org.apache.lucene.search.FieldComparator<org.apache.lucene.util.BytesRef>
      • compareValues

        public int compareValues​(org.apache.lucene.util.BytesRef val1,
                                 org.apache.lucene.util.BytesRef val2)
        Overrides:
        compareValues in class org.apache.lucene.search.FieldComparator<org.apache.lucene.util.BytesRef>
      • compareDocToValue

        public int compareDocToValue​(int doc,
                                     org.apache.lucene.util.BytesRef value)
        Specified by:
        compareDocToValue in class org.apache.lucene.search.FieldComparator<org.apache.lucene.util.BytesRef>