public class LuceneTermFieldComparator<T>
extends org.apache.lucene.search.FieldComparator<T>
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 and Description |
---|
LuceneTermFieldComparator(String fieldName,
Function<org.apache.lucene.util.BytesRef,T> parser,
Comparator<T> comparator,
int numHits) |
Modifier and Type | Method and Description |
---|---|
int |
compare(int slot1,
int slot2) |
int |
compareBottom(int doc) |
int |
compareDocToValue(int doc,
T value) |
int |
compareValues(T x,
T y) |
void |
copy(int slot,
int doc) |
protected String |
getFieldName() |
protected T |
getSortValue(int doc) |
protected org.apache.lucene.index.BinaryDocValues |
getTerms(org.apache.lucene.index.AtomicReaderContext context) |
void |
setBottom(int slot) |
org.apache.lucene.search.FieldComparator<T> |
setNextReader(org.apache.lucene.index.AtomicReaderContext context) |
T |
value(int slot) |
public LuceneTermFieldComparator(String fieldName, Function<org.apache.lucene.util.BytesRef,T> parser, Comparator<T> comparator, int numHits)
protected String getFieldName()
public int compareValues(T x, T y)
compareValues
in class org.apache.lucene.search.FieldComparator<T>
public int compare(int slot1, int slot2)
compare
in class org.apache.lucene.search.FieldComparator<T>
public void setBottom(int slot)
setBottom
in class org.apache.lucene.search.FieldComparator<T>
public int compareBottom(int doc) throws IOException
compareBottom
in class org.apache.lucene.search.FieldComparator<T>
IOException
public void copy(int slot, int doc) throws IOException
copy
in class org.apache.lucene.search.FieldComparator<T>
IOException
public org.apache.lucene.search.FieldComparator<T> setNextReader(org.apache.lucene.index.AtomicReaderContext context) throws IOException
setNextReader
in class org.apache.lucene.search.FieldComparator<T>
IOException
protected org.apache.lucene.index.BinaryDocValues getTerms(org.apache.lucene.index.AtomicReaderContext context) throws IOException
IOException
public T value(int slot)
value
in class org.apache.lucene.search.FieldComparator<T>
public int compareDocToValue(int doc, T value) throws IOException
compareDocToValue
in class org.apache.lucene.search.FieldComparator<T>
IOException
protected T getSortValue(int doc)
Copyright © 2003–2019 Atlassian. All rights reserved.