com.atlassian.confluence.search.lucene
Class CaseInsensitiveSortComparator

java.lang.Object
  extended by org.apache.lucene.search.FieldComparator<org.apache.lucene.util.BytesRef>
      extended by com.atlassian.confluence.search.lucene.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 java.lang.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 Summary
 int compare(int slot1, int slot2)
           
 int compareBottom(int doc)
           
 int compareDocToValue(int doc, org.apache.lucene.util.BytesRef value)
           
 int compareValues(org.apache.lucene.util.BytesRef val1, org.apache.lucene.util.BytesRef val2)
           
 void copy(int slot, int doc)
           
 void setBottom(int bottom)
           
 org.apache.lucene.search.FieldComparator<org.apache.lucene.util.BytesRef> setNextReader(org.apache.lucene.index.AtomicReaderContext context)
           
 org.apache.lucene.util.BytesRef value(int slot)
           
 
Methods inherited from class org.apache.lucene.search.FieldComparator
setScorer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 java.io.IOException
Specified by:
setNextReader in class org.apache.lucene.search.FieldComparator<org.apache.lucene.util.BytesRef>
Throws:
java.io.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>


Copyright © 2003-2014 Atlassian. All Rights Reserved.