public abstract class FieldValueHitQueue<T extends FieldValueHitQueue.Entry> extends PriorityQueue<T>
FieldCache.DEFAULT
for maintaining
internal term lookup tables.IndexSearcher.search(Query,Filter,int,Sort)
,
FieldCache
Modifier and Type | Class and Description |
---|---|
static class |
FieldValueHitQueue.Entry
Extension of ScoreDoc to also store the
FieldComparator slot. |
Modifier and Type | Method and 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() |
void |
setComparator(int pos,
FieldComparator<?> comparator) |
add, clear, insertWithOverflow, pop, size, top, updateTop
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.IOException
- if there is a low-level IO errorpublic FieldComparator<?>[] getComparators()
public int[] getReverseMul()
public void setComparator(int pos, FieldComparator<?> comparator)
Copyright © 2010 - 2020 Adobe. All Rights Reserved