Package org.apache.lucene.search
Class DisiPriorityQueue
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) (package private) void
downHeap
(int size) iterator()
(package private) static int
leftNode
(int node) (package private) static int
parentNode
(int node) pop()
private DisiWrapper
prepend
(DisiWrapper w1, DisiWrapper w2) (package private) static int
rightNode
(int leftNode) int
size()
top()
topList()
Get the list of scorers which are on the current doc.private DisiWrapper
topList
(DisiWrapper list, DisiWrapper[] heap, int size, int i) (package private) DisiWrapper
updateTop
(DisiWrapper topReplacement) (package private) void
upHeap
(int i) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
iterator
in interfaceIterable<DisiWrapper>
-