Package org.apache.lucene.search
Class FieldValueHitQueue.OneComparatorFieldValueHitQueue<T extends FieldValueHitQueue.Entry>
- java.lang.Object
-
- org.apache.lucene.util.PriorityQueue<T>
-
- org.apache.lucene.search.FieldValueHitQueue<T>
-
- org.apache.lucene.search.FieldValueHitQueue.OneComparatorFieldValueHitQueue<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
- Enclosing class:
- FieldValueHitQueue<T extends FieldValueHitQueue.Entry>
private static final class FieldValueHitQueue.OneComparatorFieldValueHitQueue<T extends FieldValueHitQueue.Entry> extends FieldValueHitQueue<T>
An implementation ofFieldValueHitQueuewhich is optimized in case there is just one comparator.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.search.FieldValueHitQueue
FieldValueHitQueue.Entry
-
-
Field Summary
Fields Modifier and Type Field Description private FieldComparator<?>oneComparatorprivate intoneReverseMul-
Fields inherited from class org.apache.lucene.search.FieldValueHitQueue
comparators, fields, reverseMul
-
-
Constructor Summary
Constructors Constructor Description OneComparatorFieldValueHitQueue(SortField[] fields, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanlessThan(FieldValueHitQueue.Entry hitA, FieldValueHitQueue.Entry hitB)Returns whetherhitAis less relevant thanhitB.-
Methods inherited from class org.apache.lucene.search.FieldValueHitQueue
create, fillFields, getComparators, getComparators, getFields, getReverseMul
-
Methods inherited from class org.apache.lucene.util.PriorityQueue
add, clear, getHeapArray, insertWithOverflow, iterator, pop, remove, size, top, updateTop, updateTop
-
-
-
-
Field Detail
-
oneReverseMul
private final int oneReverseMul
-
oneComparator
private final FieldComparator<?> oneComparator
-
-
Constructor Detail
-
OneComparatorFieldValueHitQueue
public OneComparatorFieldValueHitQueue(SortField[] fields, int size)
-
-
Method Detail
-
lessThan
protected boolean lessThan(FieldValueHitQueue.Entry hitA, FieldValueHitQueue.Entry hitB)
Returns whetherhitAis less relevant thanhitB.- Specified by:
lessThanin classFieldValueHitQueue<T extends FieldValueHitQueue.Entry>- Parameters:
hitA- EntryhitB- Entry- Returns:
trueif documenthitAshould be sorted after documenthitB.
-
-