org.apache.lucene.facet.sampling
public class SamplingAccumulator extends OldFacetsAccumulator
Note two major differences between this class and SamplingWrapper
:
FacetsAccumulator
while this class
directly extends OldFacetsAccumulator
.OldFacetsAccumulator.getComplementThreshold()
.
Note: Sampling accumulation (Accumulation over a sampled-set of the results),
does not guarantee accurate values for
FacetResult.getNumValidDescendants()
.
Sampler
DEFAULT_COMPLEMENT_THRESHOLD, DISABLE_COMPLEMENT, FORCE_COMPLEMENT, isUsingComplements, maxPartitions, partitionSize
facetArrays, indexReader, taxonomyReader
searchParams
Constructor and Description |
---|
SamplingAccumulator(Sampler sampler,
FacetSearchParams searchParams,
IndexReader indexReader,
TaxonomyReader taxonomyReader)
Constructor...
|
SamplingAccumulator(Sampler sampler,
FacetSearchParams searchParams,
IndexReader indexReader,
TaxonomyReader taxonomyReader,
FacetArrays facetArrays) |
Modifier and Type | Method and Description |
---|---|
List<FacetResult> |
accumulate(ScoredDocIDs docids) |
protected ScoredDocIDs |
actualDocsToAccumulate(ScoredDocIDs docids)
Set the actual set of documents over which accumulation should take place.
|
protected double |
getTotalCountsFactor()
Expert: factor by which counts should be multiplied when initializing
the count arrays from total counts.
|
accumulate, createAggregator, createFacetResultsHandler, createOrdinalValueResolver, getCategoryListMap, getComplementThreshold, isUsingComplements, mayComplement, setComplementThreshold, shouldComplement
getAggregator, groupRequests, requiresDocScores
create, create, emptyResult
public SamplingAccumulator(Sampler sampler, FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, FacetArrays facetArrays)
public SamplingAccumulator(Sampler sampler, FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
public List<FacetResult> accumulate(ScoredDocIDs docids) throws IOException
accumulate
in class OldFacetsAccumulator
IOException
protected ScoredDocIDs actualDocsToAccumulate(ScoredDocIDs docids) throws IOException
OldFacetsAccumulator
Allows to override the set of documents to accumulate for. Invoked just before actual accumulating starts. From this point that set of documents remains unmodified. Default implementation just returns the input unchanged.
actualDocsToAccumulate
in class OldFacetsAccumulator
docids
- candidate documents to accumulate forIOException
protected double getTotalCountsFactor()
OldFacetsAccumulator
getTotalCountsFactor
in class OldFacetsAccumulator
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.