org.apache.lucene.facet.sampling
public class SamplingWrapper extends OldFacetsAccumulator
Note: Sampling accumulation (Accumulation over a sampled-set of the results),
does not guarantee accurate values for
FacetResult.getNumValidDescendants()
.
DEFAULT_COMPLEMENT_THRESHOLD, DISABLE_COMPLEMENT, FORCE_COMPLEMENT, isUsingComplements, maxPartitions, partitionSize
facetArrays, indexReader, taxonomyReader
searchParams
Constructor and Description |
---|
SamplingWrapper(OldFacetsAccumulator delegee,
Sampler sampler) |
Modifier and Type | Method and Description |
---|---|
List<FacetResult> |
accumulate(ScoredDocIDs docids) |
double |
getComplementThreshold()
Returns the complement threshold.
|
void |
setComplementThreshold(double complementThreshold)
Set the complement threshold.
|
accumulate, actualDocsToAccumulate, createAggregator, createFacetResultsHandler, createOrdinalValueResolver, getCategoryListMap, getTotalCountsFactor, isUsingComplements, mayComplement, shouldComplement
getAggregator, groupRequests, requiresDocScores
create, create, emptyResult
public SamplingWrapper(OldFacetsAccumulator delegee, Sampler sampler)
public List<FacetResult> accumulate(ScoredDocIDs docids) throws IOException
accumulate
in class OldFacetsAccumulator
IOException
public double getComplementThreshold()
OldFacetsAccumulator
getComplementThreshold
in class OldFacetsAccumulator
OldFacetsAccumulator.setComplementThreshold(double)
public void setComplementThreshold(double complementThreshold)
OldFacetsAccumulator
For the default settings see OldFacetsAccumulator.DEFAULT_COMPLEMENT_THRESHOLD
.
To forcing complements in all cases pass OldFacetsAccumulator.FORCE_COMPLEMENT
.
This is mostly useful for testing purposes, as forcing complements when only
tiny fraction of available documents match the query does not make sense and
would incur performance degradations.
To disable complements pass OldFacetsAccumulator.DISABLE_COMPLEMENT
.
setComplementThreshold
in class OldFacetsAccumulator
complementThreshold
- the complement threshold to setOldFacetsAccumulator.getComplementThreshold()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.