public class RandomSampler extends Sampler
Sampler.SampleResult
samplingParams
Constructor | Description |
---|---|
RandomSampler() |
|
RandomSampler(SamplingParams params,
Random random) |
Modifier and Type | Method | Description |
---|---|---|
protected Sampler.SampleResult |
createSample(ScoredDocIDs docids,
int actualSize,
int sampleSetSize) |
Create and return a sample of the input set
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSampleFixer, getSampleSet, getSamplingParams, overSampledSearchParams, shouldSample, trimResult
public RandomSampler()
public RandomSampler(SamplingParams params, Random random) throws IllegalArgumentException
IllegalArgumentException
protected Sampler.SampleResult createSample(ScoredDocIDs docids, int actualSize, int sampleSetSize) throws IOException
Sampler
createSample
in class Sampler
docids
- input set out of which a sample is to be createdactualSize
- original size of set, prior to samplingsampleSetSize
- required size of sample setIOException
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.