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 | Field and Description | 
|---|---|
protected FieldComparator<?>[] | 
comparators  | 
protected SortField[] | 
fields
Stores the sort criteria being used. 
 | 
protected FieldComparator<?> | 
firstComparator  | 
protected int[] | 
reverseMul  | 
| 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()  | 
protected abstract boolean | 
lessThan(FieldValueHitQueue.Entry a,
        FieldValueHitQueue.Entry b)
Determines the ordering of objects in this priority queue. 
 | 
void | 
setComparator(int pos,
             FieldComparator<?> comparator)  | 
add, clear, getHeapArray, getSentinelObject, insertWithOverflow, pop, size, top, updateTopprotected final SortField[] fields
protected final FieldComparator<?>[] comparators
protected FieldComparator<?> firstComparator
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.IOException - if there is a low-level IO errorpublic FieldComparator<?>[] getComparators()
public int[] getReverseMul()
public void setComparator(int pos,
                 FieldComparator<?> comparator)
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-2012 Apache Software Foundation. All Rights Reserved.