Class SuggestScoreDocPriorityQueue
java.lang.Object
org.apache.lucene.util.PriorityQueue<TopSuggestDocs.SuggestScoreDoc>
org.apache.lucene.search.suggest.document.SuggestScoreDocPriorityQueue
- All Implemented Interfaces:
Iterable<TopSuggestDocs.SuggestScoreDoc>
Bounded priority queue for
TopSuggestDocs.SuggestScoreDoc
s. Priority is based on ScoreDoc.score
and tie is broken by ScoreDoc.doc
-
Constructor Summary
ConstructorsConstructorDescriptionSuggestScoreDocPriorityQueue
(int size) Creates a new priority queue of the specified size. -
Method Summary
Modifier and TypeMethodDescriptionReturns the top N results in descending order.protected boolean
Determines the ordering of objects in this priority queue.Methods inherited from class org.apache.lucene.util.PriorityQueue
add, addAll, clear, getHeapArray, insertWithOverflow, iterator, pop, remove, size, top, updateTop, 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
-
Constructor Details
-
SuggestScoreDocPriorityQueue
public SuggestScoreDocPriorityQueue(int size) Creates a new priority queue of the specified size.
-
-
Method Details
-
lessThan
Description copied from class:PriorityQueue
Determines the ordering of objects in this priority queue. Subclasses must define this one method.- Specified by:
lessThan
in classPriorityQueue<TopSuggestDocs.SuggestScoreDoc>
- Returns:
true
iff parametera
is less than parameterb
.
-
getResults
Returns the top N results in descending order.
-