Class TopDocsCollector<T>
A base class for all collectors that return a Top
Extending classes can override Top
Inherited Members
Namespace:
Assembly: Lucene.Net.NetCore.dll
Syntax
public abstract class TopDocsCollector<T> : Collector where T : ScoreDoc
Type Parameters
Name | Description |
---|---|
T |
Constructors
Name | Description |
---|---|
TopDocsCollector(PriorityQueue<T>) |
Fields
Name | Description |
---|---|
EMPTY_TOPDOCS | |
internal |
The total number of documents that the collector encountered. |
pq | The priority queue which holds the top documents. Note that different implementations of PriorityQueue give different meaning to 'top documents'. HitQueue for example aggregates the top scoring documents, while other PQ implementations may hold documents sorted by other criteria. |
Properties
Name | Description |
---|---|
Total |
The total number of documents that matched this query. |
Methods
Name | Description |
---|---|
New |
Returns a Top |
Populate |
Populates the results array with the ScoreDoc instaces. This can be overridden in case a different ScoreDoc type should be returned. |
Top |
Returns the top docs that were collected by this collector. |
Top |
Returns the documents in the rage [start .. pq.size()) that were collected
by this collector. Note that if start >= pq.size(), an empty TopDocs is
returned. |
Top |
Returns the documents in the rage [start .. start+howMany) that were
collected by this collector. Note that if start >= pq.size(), an empty
TopDocs is returned, and if pq.size() - start < howMany, then only the
available documents in [start .. pq.size()) are returned. |