| java.lang.Object org.apache.lucene.util.PriorityQueue org.apache.lucene.search.FieldDocSortedHitQueue
FieldDocSortedHitQueue | class FieldDocSortedHitQueue extends PriorityQueue (Code) | | 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
author: Tim Jones (Nacimiento Software) since: lucene 1.4 version: $Id: FieldDocSortedHitQueue.java 590530 2007-10-31 01:28:25Z gsingers $ |
Constructor Summary | |
| FieldDocSortedHitQueue(SortField[] fields, int size) Creates a hit queue sorted by the given list of fields.
Parameters: fields - Fieldable names, in priority order (highest priority first). Parameters: size - The number of hits to retain. |
Method Summary | |
SortField[] | getFields() Returns the fields being used to sort. | final protected boolean | lessThan(Object a, Object b) Returns whether a is less relevant than b . | synchronized void | setFields(SortField[] fields) Allows redefinition of sort fields if they are 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. |
FieldDocSortedHitQueue | FieldDocSortedHitQueue(SortField[] fields, int size)(Code) | | Creates a hit queue sorted by the given list of fields.
Parameters: fields - Fieldable names, in priority order (highest priority first). Parameters: size - The number of hits to retain. Must be greater than zero. |
getFields | SortField[] getFields()(Code) | | Returns the fields being used to sort.
|
lessThan | final protected boolean lessThan(Object a, Object b)(Code) | | Returns whether a is less relevant than b .
Parameters: a - ScoreDoc Parameters: b - ScoreDoc true if document a should be sorted after document b . |
setFields | synchronized void setFields(SortField[] fields)(Code) | | Allows redefinition of sort fields if they are 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.
Parameters: fields - |
|
|