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.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(DisiWrapper entry) void
addAll
(DisiWrapper[] entries, int offset, int len) void
clear()
Clear the heap.iterator()
pop()
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.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
-
Constructor Details
-
DisiPriorityQueue
public DisiPriorityQueue(int maxSize)
-
-
Method Details
-
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. -
add
-
addAll
-
pop
-
updateTop
-
clear
public void clear()Clear the heap. -
iterator
- Specified by:
iterator
in interfaceIterable<DisiWrapper>
-