Package org.apache.lucene.search
Class DisiPriorityQueue
- java.lang.Object
-
- org.apache.lucene.search.DisiPriorityQueue
-
- All Implemented Interfaces:
Iterable<DisiWrapper>
public final class DisiPriorityQueue extends Object implements Iterable<DisiWrapper>
A priority queue of DocIdSetIterators that orders by current doc ID. This specialization is needed overPriorityQueue
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
Constructors Constructor Description DisiPriorityQueue(int maxSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DisiWrapper
add(DisiWrapper entry)
void
addAll(DisiWrapper[] entries, int offset, int len)
void
clear()
Clear the heap.Iterator<DisiWrapper>
iterator()
DisiWrapper
pop()
int
size()
DisiWrapper
top()
DisiWrapper
top2()
Return the 2nd least value in this heap, or null if the heap contains less than 2 values.DisiWrapper
topList()
Get the list of scorers which are on the current doc.DisiWrapper
updateTop()
-
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
-
-
-
-
Method Detail
-
size
public int size()
-
top
public DisiWrapper top()
-
top2
public DisiWrapper top2()
Return the 2nd least value in this heap, or null if the heap contains less than 2 values.
-
topList
public DisiWrapper topList()
Get the list of scorers which are on the current doc.
-
add
public DisiWrapper add(DisiWrapper entry)
-
addAll
public void addAll(DisiWrapper[] entries, int offset, int len)
-
pop
public DisiWrapper pop()
-
updateTop
public DisiWrapper updateTop()
-
clear
public void clear()
Clear the heap.
-
iterator
public Iterator<DisiWrapper> iterator()
- Specified by:
iterator
in interfaceIterable<DisiWrapper>
-
-