Method Create
Create(Sort, Int32, Boolean, Boolean, Boolean, Boolean)
Creates a new TopFieldCollector from the given arguments.
NOTE: The instances returned by this method
pre-allocate a full array of length
numHits
.
Declaration
public static TopFieldCollector Create(Sort sort, int numHits, bool fillFields, bool trackDocScores, bool trackMaxScore, bool docsScoredInOrder)
Parameters
Type | Name | Description |
---|---|---|
Sort | sort | The sort criteria (SortFields). |
System.Int32 | numHits | The number of results to collect. |
System.Boolean | fillFields | Specifies whether the actual field values should be returned on the results (FieldDoc). |
System.Boolean | trackDocScores | Specifies whether document scores should be tracked and set on the
results. Note that if set to |
System.Boolean | trackMaxScore | Specifies whether the query's Lucene.Net.Search.TopFieldCollector.maxScore should be tracked and set
on the resulting TopDocs. Note that if set to |
System.Boolean | docsScoredInOrder | Specifies whether documents are scored in doc Id order or not by the given Scorer in SetScorer(Scorer). |
Returns
Type | Description |
---|---|
TopFieldCollector | A TopFieldCollector instance which will sort the results by the sort criteria. |
Create(Sort, Int32, FieldDoc, Boolean, Boolean, Boolean, Boolean)
Creates a new TopFieldCollector from the given arguments.
NOTE: The instances returned by this method
pre-allocate a full array of length
numHits
.
Declaration
public static TopFieldCollector Create(Sort sort, int numHits, FieldDoc after, bool fillFields, bool trackDocScores, bool trackMaxScore, bool docsScoredInOrder)
Parameters
Type | Name | Description |
---|---|---|
Sort | sort | The sort criteria (SortFields). |
System.Int32 | numHits | The number of results to collect. |
FieldDoc | after | Only hits after this FieldDoc will be collected |
System.Boolean | fillFields | Specifies whether the actual field values should be returned on the results (FieldDoc). |
System.Boolean | trackDocScores | Specifies whether document scores should be tracked and set on the
results. Note that if set to |
System.Boolean | trackMaxScore | Specifies whether the query's maxScore should be tracked and set
on the resulting TopDocs. Note that if set to |
System.Boolean | docsScoredInOrder | Specifies whether documents are scored in doc Id order or not by the given Scorer in SetScorer(Scorer). |
Returns
Type | Description |
---|---|
TopFieldCollector | A TopFieldCollector instance which will sort the results by the sort criteria. |