Class RandomSamplingFacetsCollector
Collects hits for subsequent faceting, using sampling if needed. Once you've
run a search and collect hits into this, instantiate one of the
Facets subclasses to do the facet counting. Note that this collector
does not collect the scores of matching docs (i.e.
Scores) is null
.
If you require the original set of hits, you can call GetOriginalMatchingDocs(). Also, since the counts of the top-facets is based on the sampled set, you can amortize the counts by calling AmortizeFacetCounts(FacetResult, FacetsConfig, IndexSearcher).
Inherited Members
Assembly: DistributedLucene.Net.Facet.dll
Syntax
public class RandomSamplingFacetsCollector : FacetsCollector, ICollector, IDisposable, IIdentifiableSurrogate
Constructors
Name | Description |
---|---|
RandomSamplingFacetsCollector(Int32, Int64, String) | Constructor with the given sample size and seed. |
RandomSamplingFacetsCollector(Int32, String) | Constructor with the given sample size and default seed. |
Properties
Name | Description |
---|---|
SamplingRate | Returns the sampling rate that was used. |
Methods
Name | Description |
---|---|
AmortizeFacetCounts(FacetResult, FacetsConfig, IndexSearcher) | Note: if you use a counting Facets implementation, you can amortize the sampled counts by calling this method. Uses the FacetsConfig and the IndexSearcher to determine the upper bound for each facet value. |
GetMatchingDocs() | Returns the sampled list of the matching documents. Note that a FacetsCollector.MatchingDocs instance is returned per segment, even if no hits from that segment are included in the sampled set. Note: One or more of the FacetsCollector.MatchingDocs might be empty (not containing any hits) as result of sampling.
Note: TotalHits is copied from the original
FacetsCollector.MatchingDocs, scores is set to |
GetOriginalMatchingDocs() | Returns the original matching documents. |