public abstract class AbstractFieldComparator extends FieldComparatorBase
FieldComparator
s which keep their values
(Comparable
s) in an array.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.StringComparatorLocale, org.apache.lucene.search.FieldComparator.StringOrdValComparator, org.apache.lucene.search.FieldComparator.StringValComparator
Modifier and Type | Field and Description |
---|---|
protected List<org.apache.lucene.index.IndexReader> |
readers
The index readers.
|
protected int[] |
starts
The document number starts for the
readers . |
Modifier | Constructor and Description |
---|---|
protected |
AbstractFieldComparator(int numHits)
Create a new instance with the given number of values.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getUUIDForIndex(int doc) |
Comparable<?> |
getValue(int slot)
Return a value from the values array
|
protected int |
readerIndex(int n)
Returns the reader index for document
n . |
void |
setNextReader(org.apache.lucene.index.IndexReader reader,
int docBase) |
void |
setValue(int slot,
Comparable<?> value)
Add the given value to the values array
|
compare, compare, compareBottom, copy, setBottom, sortValue, value
protected final List<org.apache.lucene.index.IndexReader> readers
protected int[] starts
readers
.protected AbstractFieldComparator(int numHits)
numHits
- the number of valuesprotected final int readerIndex(int n)
n
.n
- document number.public void setValue(int slot, Comparable<?> value)
setValue
in class FieldComparatorBase
slot
- index into valuesvalue
- value for addingpublic Comparable<?> getValue(int slot)
getValue
in class FieldComparatorBase
slot
- index to retrievepublic void setNextReader(org.apache.lucene.index.IndexReader reader, int docBase) throws IOException
setNextReader
in class org.apache.lucene.search.FieldComparator
IOException
protected String getUUIDForIndex(int doc) throws IOException
IOException
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.