Package org.apache.lucene.facet.sampling

Examples of org.apache.lucene.facet.sampling.SamplingAccumulator


    // Verify that sampling is enabled and required ... otherwise do default
    if (sampler == null || !sampler.shouldSample(docids)) {
      return this;
    }
   
    SamplingAccumulator samplingAccumulator = new SamplingAccumulator(sampler, searchParams, indexReader, taxonomyReader);
    samplingAccumulator.setComplementThreshold(getComplementThreshold());
    return samplingAccumulator;
  }
View Full Code Here


    final Sampler sampler = new RandomSampler(sampleParams, random());
   
    TaxonomyFacetsAccumulator[] accumulators = new TaxonomyFacetsAccumulator[] {
      new TaxonomyFacetsAccumulator(fsp, indexReader, taxoReader),
      new OldFacetsAccumulator(fsp, indexReader, taxoReader),
      new SamplingAccumulator(sampler, fsp, indexReader, taxoReader),
      new AdaptiveFacetsAccumulator(fsp, indexReader, taxoReader),
      new SamplingWrapper(new OldFacetsAccumulator(fsp, indexReader, taxoReader), sampler)
    };
   
    for (TaxonomyFacetsAccumulator fa : accumulators) {
View Full Code Here

  /** search reader <code>r</code>*/
  private FacetResult searchWithFacets(IndexReader r, TaxonomyReader tr, FacetSearchParams fsp,
      final SamplingParams params) throws IOException {
    // a FacetsCollector with a sampling accumulator
    Sampler sampler = new RandomSampler(params, random());
    StandardFacetsAccumulator sfa = new SamplingAccumulator(sampler, fsp, r, tr);
    FacetsCollector fcWithSampling = FacetsCollector.create(sfa);
   
    IndexSearcher s = new IndexSearcher(r);
    s.search(new MatchAllDocsQuery(), fcWithSampling);
   
View Full Code Here

    final Sampler sampler = new RandomSampler(sampleParams, random());
   
    TaxonomyFacetsAccumulator[] accumulators = new TaxonomyFacetsAccumulator[] {
      new TaxonomyFacetsAccumulator(fsp, indexReader, taxoReader),
      new OldFacetsAccumulator(fsp, indexReader, taxoReader),
      new SamplingAccumulator(sampler, fsp, indexReader, taxoReader),
      new AdaptiveFacetsAccumulator(fsp, indexReader, taxoReader),
      new SamplingWrapper(new OldFacetsAccumulator(fsp, indexReader, taxoReader), sampler)
    };
   
    for (TaxonomyFacetsAccumulator fa : accumulators) {
View Full Code Here

    final Sampler sampler = new RandomSampler(sampleParams, random());
   
    FacetsAccumulator[] accumulators = new FacetsAccumulator[] {
      new FacetsAccumulator(fsp, indexReader, taxoReader),
      new StandardFacetsAccumulator(fsp, indexReader, taxoReader),
      new SamplingAccumulator(sampler, fsp, indexReader, taxoReader),
      new AdaptiveFacetsAccumulator(fsp, indexReader, taxoReader),
      new SamplingWrapper(new StandardFacetsAccumulator(fsp, indexReader, taxoReader), sampler)
    };
   
    for (FacetsAccumulator fa : accumulators) {
View Full Code Here

  /** search reader <code>r</code>*/
  private FacetResult searchWithFacets(IndexReader r, TaxonomyReader tr, FacetSearchParams fsp,
      final SamplingParams params) throws IOException {
    // a FacetsCollector with a sampling accumulator
    Sampler sampler = new RandomSampler(params, random());
    StandardFacetsAccumulator sfa = new SamplingAccumulator(sampler, fsp, r, tr);
    FacetsCollector fcWithSampling = FacetsCollector.create(sfa);
   
    IndexSearcher s = newSearcher(r);
    s.search(new MatchAllDocsQuery(), fcWithSampling);
   
View Full Code Here

public class SamplingAccumulatorTest extends BaseSampleTestTopK {

  @Override
  protected StandardFacetsAccumulator getSamplingAccumulator(Sampler sampler, TaxonomyReader taxoReader,
      IndexReader indexReader, FacetSearchParams searchParams) {
    return new SamplingAccumulator(sampler, searchParams, indexReader, taxoReader);
  }
View Full Code Here

    // Verify that sampling is enabled and required ... otherwise do default
    if (sampler == null || !sampler.shouldSample(docids)) {
      return this;
    }
   
    SamplingAccumulator samplingAccumulator = new SamplingAccumulator(sampler, searchParams, indexReader, taxonomyReader);
    samplingAccumulator.setComplementThreshold(getComplementThreshold());
    return samplingAccumulator;
  }
View Full Code Here

TOP

Related Classes of org.apache.lucene.facet.sampling.SamplingAccumulator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.