public final class AdaptiveFacetsAccumulator extends StandardFacetsAccumulator
FacetsAccumulator
whose behavior regarding complements, sampling,
etc. is not set up front but rather is determined at accumulation time
according to the statistics of the accumulated set of documents and the
index.
Note: Sampling accumulation (Accumulation over a sampled-set of the results),
does not guarantee accurate values for
FacetResult.getNumValidDescendants()
&
FacetResultNode.getResidue()
.
floatArrayAllocator, intArrayAllocator, isUsingComplements, maxPartitions, partitionSize
DEFAULT_COMPLEMENT_THRESHOLD, DISABLE_COMPLEMENT, FORCE_COMPLEMENT, indexReader, searchParams, taxonomyReader
Constructor and Description |
---|
AdaptiveFacetsAccumulator(FacetSearchParams searchParams,
IndexReader indexReader,
TaxonomyReader taxonomyReader)
Create an
AdaptiveFacetsAccumulator |
AdaptiveFacetsAccumulator(FacetSearchParams searchParams,
IndexReader indexReader,
TaxonomyReader taxonomyReader,
IntArrayAllocator intArrayAllocator,
FloatArrayAllocator floatArrayAllocator)
Create an
AdaptiveFacetsAccumulator |
Modifier and Type | Method and Description |
---|---|
List<FacetResult> |
accumulate(ScoredDocIDs docids)
Accumulate facets over given documents, according to facet requests in effect.
|
Sampler |
getSampler() |
void |
setSampler(Sampler sampler)
Set the sampler.
|
actualDocsToAccumulate, getCategoryListMap, getTotalCountsFactor, shouldComplement
getComplementThreshold, isAllowLabeling, mayComplement, setAllowLabeling, setComplementThreshold
public AdaptiveFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
AdaptiveFacetsAccumulator
public AdaptiveFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
AdaptiveFacetsAccumulator
public void setSampler(Sampler sampler)
sampler
- sampler to setpublic List<FacetResult> accumulate(ScoredDocIDs docids) throws IOException
FacetsAccumulator
accumulate
in class StandardFacetsAccumulator
docids
- documents (and their scores) for which facets are Accumulated.IOException
- on error.public final Sampler getSampler()