Class TopFieldCollector
A ICollector that sorts by Sort
See the Create(Sort, Int32, Boolean, Boolean, Boolean, Boolean) method
for instantiating a Top
Inherited Members
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.dll
Syntax
public abstract class TopFieldCollector : TopDocsCollector<FieldValueHitQueue.Entry>, ITopDocsCollector, ICollector
Properties
| Improve this Doc View SourceAcceptsDocsOutOfOrder
Declaration
public override bool AcceptsDocsOutOfOrder { get; }
Property Value
Type | Description |
---|---|
System. |
Overrides
Methods
| Improve this Doc View SourceCreate(Sort, Int32, FieldDoc, Boolean, Boolean, Boolean, Boolean)
Creates a new Top
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 (Sort |
System. |
numHits | The number of results to collect. |
Field |
after | Only hits after this Field |
System. |
fillFields | Specifies whether the actual field values should be returned on
the results (Field |
System. |
trackDocScores | Specifies whether document scores should be tracked and set on the
results. Note that if set to |
System. |
trackMaxScore | Specifies whether the query's maxScore should be tracked and set
on the resulting Top |
System. |
docsScoredInOrder | Specifies whether documents are scored in doc Id order or not by
the given Scorer in Set |
Returns
Type | Description |
---|---|
Top |
A Top |
Create(Sort, Int32, Boolean, Boolean, Boolean, Boolean)
Creates a new Top
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 (Sort |
System. |
numHits | The number of results to collect. |
System. |
fillFields | Specifies whether the actual field values should be returned on
the results (Field |
System. |
trackDocScores | Specifies whether document scores should be tracked and set on the
results. Note that if set to |
System. |
trackMaxScore | Specifies whether the query's Lucene. |
System. |
docsScoredInOrder | Specifies whether documents are scored in doc Id order or not by
the given Scorer in Set |
Returns
Type | Description |
---|---|
Top |
A Top |
NewTopDocs(ScoreDoc[], Int32)
Declaration
protected override TopDocs NewTopDocs(ScoreDoc[] results, int start)
Parameters
Type | Name | Description |
---|---|---|
Score |
results | |
System. |
start |
Returns
Type | Description |
---|---|
Top |
Overrides
PopulateResults(ScoreDoc[], Int32)
Declaration
protected override void PopulateResults(ScoreDoc[] results, int howMany)
Parameters
Type | Name | Description |
---|---|---|
Score |
results | |
System. |
howMany |