java.lang.Object
org.apache.lucene.search.DisiPriorityQueue
- All Implemented Interfaces:
Iterable<DisiWrapper>
A priority queue of DocIdSetIterators that orders by current doc ID. This specialization is
needed over
PriorityQueue because the pluggable comparison function makes the rebalancing
quite slow.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(DisiWrapper entry) voidaddAll(DisiWrapper[] entries, int offset, int len) voidclear()Clear the heap.(package private) voiddownHeap(int size) iterator()(package private) static intleftNode(int node) (package private) static intparentNode(int node) pop()private DisiWrapperprepend(DisiWrapper w1, DisiWrapper w2) (package private) static intrightNode(int leftNode) intsize()top()top2()Return the 2nd least value in this heap, or null if the heap contains less than 2 values.topList()Get the list of scorers which are on the current doc.private DisiWrappertopList(DisiWrapper list, DisiWrapper[] heap, int size, int i) (package private) DisiWrapperupdateTop(DisiWrapper topReplacement) (package private) voidupHeap(int i) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
heap
-
size
private int size
-
-
Constructor Details
-
DisiPriorityQueue
public DisiPriorityQueue(int maxSize)
-
-
Method Details
-
leftNode
static int leftNode(int node) -
rightNode
static int rightNode(int leftNode) -
parentNode
static int parentNode(int node) -
size
public int size() -
top
-
top2
Return the 2nd least value in this heap, or null if the heap contains less than 2 values. -
topList
Get the list of scorers which are on the current doc. -
prepend
-
topList
-
add
-
addAll
-
pop
-
updateTop
-
updateTop
-
clear
public void clear()Clear the heap. -
upHeap
void upHeap(int i) -
downHeap
void downHeap(int size) -
iterator
- Specified by:
iteratorin interfaceIterable<DisiWrapper>
-