/// <summary> /// Constructor with the given sample size and seed. /// </summary> /// <param name="sampleSize"> /// The preferred sample size. If the number of hits is greater than /// the size, sampling will be done using a sample ratio of sampling /// size / totalN. For example: 1000 hits, sample size = 10 results in /// samplingRatio of 0.01. If the number of hits is lower, no sampling /// is done at all </param> /// <param name="seed"> /// The random seed. If <c>0</c> then a seed will be chosen for you. </param> public RandomSamplingFacetsCollector(int sampleSize, long seed) : base(false) { this.sampleSize = sampleSize; this.random = new XORShift64Random(seed); this.sampledDocs = null; }
/// <summary> /// Constructor with the given sample size and seed. /// </summary> /// <param name="sampleSize"> /// The preferred sample size. If the number of hits is greater than /// the size, sampling will be done using a sample ratio of sampling /// size / totalN. For example: 1000 hits, sample size = 10 results in /// samplingRatio of 0.01. If the number of hits is lower, no sampling /// is done at all </param> /// <param name="seed"> /// The random seed. If {@code 0} then a seed will be chosen for you. </param> public RandomSamplingFacetsCollector(int sampleSize, long seed) : base(false) { this.sampleSize = sampleSize; this.random = new XORShift64Random(seed); this.sampledDocs = null; }