Class LuceneMultiTermFieldComparator<T>
- java.lang.Object
-
- org.apache.lucene.search.FieldComparator<T>
-
- com.atlassian.confluence.internal.search.v2.lucene.LuceneTermFieldComparator<T>
-
- com.atlassian.confluence.internal.search.v2.lucene.LuceneMultiTermFieldComparator<T>
-
public class LuceneMultiTermFieldComparator<T> extends LuceneTermFieldComparator<T>
When returned from FieldComparatorSource.newComparator, a LuceneMultiTermFieldComparator compares hits so as to determine their sort order when collecting results, using a custom sort comparator that operates on terms that may have multiple values per document.
-
-
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
-
-
Constructor Summary
Constructors Constructor Description LuceneMultiTermFieldComparator(String fieldName, Function<Iterable<org.apache.lucene.util.BytesRef>,T> parser, Comparator<T> comparator, int numHits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.lucene.index.SortedSetDocValues
getDocTermOrds(org.apache.lucene.index.AtomicReaderContext context)
Function<Iterable<org.apache.lucene.util.BytesRef>,T>
getParser()
protected T
getSortValue(int doc)
org.apache.lucene.search.FieldComparator<T>
setNextReader(org.apache.lucene.index.AtomicReaderContext context)
-
Methods inherited from class com.atlassian.confluence.internal.search.v2.lucene.LuceneTermFieldComparator
compare, compareBottom, compareDocToValue, compareValues, copy, getFieldName, getTerms, setBottom, value
-
-
-
-
Method Detail
-
setNextReader
public org.apache.lucene.search.FieldComparator<T> setNextReader(org.apache.lucene.index.AtomicReaderContext context) throws IOException
- Overrides:
setNextReader
in classLuceneTermFieldComparator<T>
- Throws:
IOException
-
getDocTermOrds
protected org.apache.lucene.index.SortedSetDocValues getDocTermOrds(org.apache.lucene.index.AtomicReaderContext context) throws IOException
- Throws:
IOException
-
getSortValue
protected T getSortValue(int doc)
- Overrides:
getSortValue
in classLuceneTermFieldComparator<T>
-
-