|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.util.PriorityQueue<ShardFieldDoc> org.apache.lucene.search.ShardFieldDocSortedHitQueue
public class ShardFieldDocSortedHitQueue
Constructor Summary | |
---|---|
ShardFieldDocSortedHitQueue(org.apache.lucene.search.SortField[] fields,
int size)
Creates a hit queue sorted by the given list of fields. |
Method Summary | |
---|---|
protected boolean |
lessThan(ShardFieldDoc docA,
ShardFieldDoc docB)
Returns whether a is less relevant than b . |
void |
setFields(org.apache.lucene.search.SortField[] fields)
Allows redefinition of sort fields if they are null . |
Methods inherited from class org.apache.lucene.util.PriorityQueue |
---|
add, clear, getHeapArray, getSentinelObject, initialize, insertWithOverflow, pop, size, top, updateTop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShardFieldDocSortedHitQueue(org.apache.lucene.search.SortField[] fields, int size)
fields
- Fieldable names, in priority order (highest priority first).size
- The number of hits to retain. Must be greater than zero.Method Detail |
---|
public void setFields(org.apache.lucene.search.SortField[] fields)
null
.
This is to handle the case using ParallelMultiSearcher where the
original list contains AUTO and we don't know the actual sort
type until the values come back. The fields can only be set once.
This method should be synchronized external like all other PQ methods.
fields
- protected final boolean lessThan(ShardFieldDoc docA, ShardFieldDoc docB)
a
is less relevant than b
.
lessThan
in class org.apache.lucene.util.PriorityQueue<ShardFieldDoc>
a
- ScoreDocb
- ScoreDoc
true
if document a
should be sorted after document b
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |