|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.creole.annic.apache.lucene.util.PriorityQueue
gate.creole.annic.apache.lucene.search.FieldDocSortedHitQueue
class FieldDocSortedHitQueue
Expert: Collects sorted results from Searchable's and collates them. The elements put into this queue must be of type FieldDoc.
Created: Feb 11, 2004 2:04:21 PM
| Field Summary | |
|---|---|
(package private) Collator[] |
collators
|
(package private) SortField[] |
fields
|
| Constructor Summary | |
|---|---|
FieldDocSortedHitQueue(SortField[] fields,
int size)
Creates a hit queue sorted by the given list of fields. |
|
| Method Summary | |
|---|---|
(package private) SortField[] |
getFields()
Returns the fields being used to sort. |
private Collator[] |
hasCollators(SortField[] fields)
Returns an array of collators, possibly null. |
protected boolean |
lessThan(Object a,
Object b)
Returns whether a is less relevant than b. |
(package private) void |
setFields(SortField[] fields)
Allows redefinition of sort fields if they are null. |
| Methods inherited from class gate.creole.annic.apache.lucene.util.PriorityQueue |
|---|
adjustTop, clear, initialize, insert, pop, put, size, top |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
volatile SortField[] fields
volatile Collator[] collators
| Constructor Detail |
|---|
FieldDocSortedHitQueue(SortField[] fields,
int size)
throws IOException
fields - Field names, in priority order (highest priority first).size - The number of hits to retain. Must be greater than zero.
IOException| Method Detail |
|---|
void setFields(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 is thread safe.
fields - SortField[] getFields()
private Collator[] hasCollators(SortField[] fields)
null. The collators
correspond to any SortFields which were given a specific locale.
fields - Array of sort fields.
null.
protected final boolean lessThan(Object a,
Object b)
a is less relevant than b.
lessThan in class PriorityQueuea - 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 | |||||||||