Module org.apache.lucene.queries
Class DisiPriorityQueue
java.lang.Object
org.apache.lucene.queries.intervals.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) (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()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
-
topList
Get the list of scorers which are on the current doc. -
prepend
-
topList
-
add
-
pop
-
updateTop
-
updateTop
-
upHeap
void upHeap(int i) -
downHeap
void downHeap(int size) -
iterator
- Specified by:
iteratorin interfaceIterable<DisiWrapper>
-