## org.apache.lucene.facet.sampling
Class TakmiSampleFixer

    java.lang.Object
      org.apache.lucene.facet.sampling.SampleFixer
          org.apache.lucene.facet.sampling.TakmiSampleFixer

    public class TakmiSampleFixer

extends SampleFixer

Fix sampling results by correct results, by counting the intersection between two lists: a TermDocs (list of documents in a certain category) and a DocIdSetIterator (list of documents matching the query).

This fixer is suitable for scenarios which prioritize accuracy over performance.

Note: for statistically more accurate top-k selection, set `oversampleFactor` to at least 2, so that the top-k categories would have better chance of showing up in the sampled top-cK results (see `SamplingParams.getOversampleFactor()`

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
`TakmiSampleFixer(IndexReader indexReader, TaxonomyReader taxonomyReader, FacetSearchParams searchParams)`

Method Summary
`void` `singleNodeFix(FacetResultNode facetResNode, ScoredDocIDs docIds, double samplingRatio)` Fix the given node's value.

Methods inherited from class org.apache.lucene.facet.sampling.SampleFixer
`fixResult, fixResultNode`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TakmiSampleFixer

    public TakmiSampleFixer(IndexReader indexReader,
                            TaxonomyReader taxonomyReader,
                            FacetSearchParams searchParams)

Method Detail

### singleNodeFix

    public void singleNodeFix(FacetResultNode facetResNode,
                              ScoredDocIDs docIds,
                              double samplingRatio)
                       throws IOException

  Description copied from class: `SampleFixer`
  Fix the given node's value.

  Specified by:
    `singleNodeFix` in class `SampleFixer`
  Throws:
    `IOException`

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.