Class FacetsCollector
Collects hits for subsequent faceting. Once you've run
a search and collect hits into this, instantiate one of
the subclasses to do the facet
counting. Use the Search utility methods (such as Search(IndexSearcher, Query, Int32, ICollector)) to
perform an "ordinary" search but also collect into a
Facets.
Inheritance
System.Object
FacetsCollector
Assembly: Lucene.Net.Facet.dll
Syntax
public class FacetsCollector : ICollector
Constructors
|
Improve this Doc
View Source
FacetsCollector()
Declaration
|
Improve this Doc
View Source
FacetsCollector(Boolean)
Create this; if keepScores
is true
then a
float[] is allocated to hold score of all hits.
Declaration
public FacetsCollector(bool keepScores)
Parameters
Type |
Name |
Description |
System.Boolean |
keepScores |
|
Properties
|
Improve this Doc
View Source
AcceptsDocsOutOfOrder
Declaration
public bool AcceptsDocsOutOfOrder { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
KeepScores
True if scores were saved.
Declaration
public bool KeepScores { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
|
Improve this Doc
View Source
Collect(Int32)
Declaration
public void Collect(int doc)
Parameters
Type |
Name |
Description |
System.Int32 |
doc |
|
|
Improve this Doc
View Source
CreateDocs(Int32)
Creates a FacetsCollector.Docs to record hits. The default uses
to record hits and you can override to e.g. record the docs in your own
.
Declaration
protected virtual FacetsCollector.Docs CreateDocs(int maxDoc)
Parameters
Type |
Name |
Description |
System.Int32 |
maxDoc |
|
Returns
|
Improve this Doc
View Source
GetMatchingDocs()
Declaration
public virtual IList<FacetsCollector.MatchingDocs> GetMatchingDocs()
Returns
|
Improve this Doc
View Source
Search(IndexSearcher, Query, Filter, Int32, ICollector)
Utility method, to search and also collect all hits
into the provided .
Declaration
public static TopDocs Search(IndexSearcher searcher, Query q, Filter filter, int n, ICollector fc)
Parameters
Type |
Name |
Description |
IndexSearcher |
searcher |
|
Query |
q |
|
Filter |
filter |
|
System.Int32 |
n |
|
ICollector |
fc |
|
Returns
|
Improve this Doc
View Source
Search(IndexSearcher, Query, Filter, Int32, Sort, ICollector)
Utility method, to search and also collect all hits
into the provided .
Declaration
public static TopFieldDocs Search(IndexSearcher searcher, Query q, Filter filter, int n, Sort sort, ICollector fc)
Parameters
Type |
Name |
Description |
IndexSearcher |
searcher |
|
Query |
q |
|
Filter |
filter |
|
System.Int32 |
n |
|
Sort |
sort |
|
ICollector |
fc |
|
Returns
Type |
Description |
TopFieldDocs |
|
|
Improve this Doc
View Source
Search(IndexSearcher, Query, Filter, Int32, Sort, Boolean, Boolean, ICollector)
Utility method, to search and also collect all hits
into the provided .
Declaration
public static TopFieldDocs Search(IndexSearcher searcher, Query q, Filter filter, int n, Sort sort, bool doDocScores, bool doMaxScore, ICollector fc)
Parameters
Type |
Name |
Description |
IndexSearcher |
searcher |
|
Query |
q |
|
Filter |
filter |
|
System.Int32 |
n |
|
Sort |
sort |
|
System.Boolean |
doDocScores |
|
System.Boolean |
doMaxScore |
|
ICollector |
fc |
|
Returns
Type |
Description |
TopFieldDocs |
|
|
Improve this Doc
View Source
Search(IndexSearcher, Query, Int32, ICollector)
Utility method, to search and also collect all hits
into the provided .
Declaration
public static TopDocs Search(IndexSearcher searcher, Query q, int n, ICollector fc)
Parameters
Type |
Name |
Description |
IndexSearcher |
searcher |
|
Query |
q |
|
System.Int32 |
n |
|
ICollector |
fc |
|
Returns
|
Improve this Doc
View Source
SearchAfter(IndexSearcher, ScoreDoc, Query, Filter, Int32, ICollector)
Utility method, to search and also collect all hits
into the provided .
Declaration
public static TopDocs SearchAfter(IndexSearcher searcher, ScoreDoc after, Query q, Filter filter, int n, ICollector fc)
Parameters
Type |
Name |
Description |
IndexSearcher |
searcher |
|
ScoreDoc |
after |
|
Query |
q |
|
Filter |
filter |
|
System.Int32 |
n |
|
ICollector |
fc |
|
Returns
|
Improve this Doc
View Source
SearchAfter(IndexSearcher, ScoreDoc, Query, Filter, Int32, Sort, ICollector)
Utility method, to search and also collect all hits
into the provided .
Declaration
public static TopDocs SearchAfter(IndexSearcher searcher, ScoreDoc after, Query q, Filter filter, int n, Sort sort, ICollector fc)
Parameters
Type |
Name |
Description |
IndexSearcher |
searcher |
|
ScoreDoc |
after |
|
Query |
q |
|
Filter |
filter |
|
System.Int32 |
n |
|
Sort |
sort |
|
ICollector |
fc |
|
Returns
|
Improve this Doc
View Source
SearchAfter(IndexSearcher, ScoreDoc, Query, Filter, Int32, Sort, Boolean, Boolean, ICollector)
Utility method, to search and also collect all hits
into the provided .
Declaration
public static TopDocs SearchAfter(IndexSearcher searcher, ScoreDoc after, Query q, Filter filter, int n, Sort sort, bool doDocScores, bool doMaxScore, ICollector fc)
Parameters
Type |
Name |
Description |
IndexSearcher |
searcher |
|
ScoreDoc |
after |
|
Query |
q |
|
Filter |
filter |
|
System.Int32 |
n |
|
Sort |
sort |
|
System.Boolean |
doDocScores |
|
System.Boolean |
doMaxScore |
|
ICollector |
fc |
|
Returns
|
Improve this Doc
View Source
SearchAfter(IndexSearcher, ScoreDoc, Query, Int32, ICollector)
Utility method, to search and also collect all hits
into the provided .
Declaration
public virtual TopDocs SearchAfter(IndexSearcher searcher, ScoreDoc after, Query q, int n, ICollector fc)
Parameters
Type |
Name |
Description |
IndexSearcher |
searcher |
|
ScoreDoc |
after |
|
Query |
q |
|
System.Int32 |
n |
|
ICollector |
fc |
|
Returns
|
Improve this Doc
View Source
SetNextReader(AtomicReaderContext)
Declaration
public void SetNextReader(AtomicReaderContext context)
Parameters
Type |
Name |
Description |
AtomicReaderContext |
context |
|
|
Improve this Doc
View Source
SetScorer(Scorer)
Declaration
public void SetScorer(Scorer scorer)
Parameters
Type |
Name |
Description |
Scorer |
scorer |
|