public abstract class FieldValueHitQueue<T extends FieldValueHitQueue.Entry> extends PriorityQueue<T>
FieldCache.DEFAULT for maintaining
internal term lookup tables.Searcher.search(Query,Filter,int,Sort),
FieldCache| Modifier and Type | Class | Description |
|---|---|---|
static class |
FieldValueHitQueue.Entry |
| Modifier and Type | Field | Description |
|---|---|---|
protected FieldComparator<?>[] |
comparators |
|
protected SortField[] |
fields |
Stores the sort criteria being used.
|
protected int[] |
reverseMul |
| Modifier and Type | Method | Description |
|---|---|---|
static <T extends FieldValueHitQueue.Entry> |
create(SortField[] fields,
int size) |
Creates a hit queue sorted by the given list of fields.
|
FieldComparator<?>[] |
getComparators() |
|
int[] |
getReverseMul() |
|
protected abstract boolean |
lessThan(FieldValueHitQueue.Entry a,
FieldValueHitQueue.Entry b) |
Determines the ordering of objects in this priority queue.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, clear, getHeapArray, getSentinelObject, initialize, insertWithOverflow, pop, size, top, updateTopprotected final SortField[] fields
protected final FieldComparator<?>[] comparators
protected final int[] reverseMul
public static <T extends FieldValueHitQueue.Entry> FieldValueHitQueue<T> create(SortField[] fields, int size) throws IOException
NOTE: The instances returned by this method
pre-allocate a full array of length numHits.
fields - SortField array we are sorting by in priority order (highest
priority first); cannot be null or emptysize - The number of hits to retain. Must be greater than zero.IOExceptionpublic FieldComparator<?>[] getComparators()
public int[] getReverseMul()
protected abstract boolean lessThan(FieldValueHitQueue.Entry a, FieldValueHitQueue.Entry b)
PriorityQueuelessThan in class PriorityQueue<T extends FieldValueHitQueue.Entry>true iff parameter a is less than parameter b.Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.