Class RepeatableSampler
- java.lang.Object
-
- org.apache.lucene.facet.search.sampling.Sampler
-
- org.apache.lucene.facet.search.sampling.RepeatableSampler
-
public class RepeatableSampler extends Sampler
Take random samples of large collections.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.facet.search.sampling.Sampler
Sampler.SampleResult
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.facet.search.sampling.Sampler
samplingParams
-
-
Constructor Summary
Constructors Constructor Description RepeatableSampler(SamplingParams params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Sampler.SampleResult
createSample(ScoredDocIDs docids, int actualSize, int sampleSetSize)
Create and return a sample of the input set-
Methods inherited from class org.apache.lucene.facet.search.sampling.Sampler
getSampleFixer, getSampleSet, getSamplingParams, overSampledSearchParams, shouldSample, trimResult
-
-
-
-
Constructor Detail
-
RepeatableSampler
public RepeatableSampler(SamplingParams params)
-
-
Method Detail
-
createSample
protected Sampler.SampleResult createSample(ScoredDocIDs docids, int actualSize, int sampleSetSize) throws IOException
Description copied from class:Sampler
Create and return a sample of the input set- Specified by:
createSample
in classSampler
- Parameters:
docids
- input set out of which a sample is to be createdactualSize
- original size of set, prior to samplingsampleSetSize
- required size of sample set- Returns:
- sample of the input set in the required size
- Throws:
IOException
-
-