public class SamplingAccumulator extends StandardFacetsAccumulator
Note two major differences between this class and SamplingWrapper:
FacetsAccumulator while this class
directly extends StandardFacetsAccumulator.FacetsAccumulator.getComplementThreshold().
Note: Sampling accumulation (Accumulation over a sampled-set of the results),
does not guarantee accurate values for
FacetResult.getNumValidDescendants() &
FacetResultNode.getResidue().
SamplerfloatArrayAllocator, intArrayAllocator, isUsingComplements, maxPartitions, partitionSizeDEFAULT_COMPLEMENT_THRESHOLD, DISABLE_COMPLEMENT, FORCE_COMPLEMENT, indexReader, searchParams, taxonomyReader| Constructor and Description |
|---|
SamplingAccumulator(Sampler sampler,
FacetSearchParams searchParams,
IndexReader indexReader,
TaxonomyReader taxonomyReader)
Constructor...
|
SamplingAccumulator(Sampler sampler,
FacetSearchParams searchParams,
IndexReader indexReader,
TaxonomyReader taxonomyReader,
IntArrayAllocator intArrayAllocator,
FloatArrayAllocator floatArrayAllocator)
Constructor...
|
| Modifier and Type | Method and Description |
|---|---|
List<FacetResult> |
accumulate(ScoredDocIDs docids)
Accumulate facets over given documents, according to facet requests in effect.
|
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.
|
getCategoryListMap, shouldComplementgetComplementThreshold, isAllowLabeling, mayComplement, setAllowLabeling, setComplementThresholdpublic SamplingAccumulator(Sampler sampler, FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
public SamplingAccumulator(Sampler sampler, FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
public List<FacetResult> accumulate(ScoredDocIDs docids) throws IOException
FacetsAccumulatoraccumulate in class StandardFacetsAccumulatordocids - documents (and their scores) for which facets are Accumulated.IOException - on error.protected ScoredDocIDs actualDocsToAccumulate(ScoredDocIDs docids) throws IOException
StandardFacetsAccumulatorAllows 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 StandardFacetsAccumulatordocids - candidate documents to accumulate forIOExceptionprotected double getTotalCountsFactor()
StandardFacetsAccumulatorgetTotalCountsFactor in class StandardFacetsAccumulator