Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

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

Direct Known Subclasses:
  TakmiSampleFixer

    public abstract class SampleFixer

extends Object

Fixer of sample facet accumulation results.

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

Constructor Summary
`SampleFixer()`

Method Summary
`void` | `fixResult(ScoredDocIDs origDocIds, FacetResult fres, double samplingRatio)` Alter the input result, fixing it to account for the sampling.
`protected void` | `fixResultNode(FacetResultNode facetResNode, ScoredDocIDs docIds, double samplingRatio)` Fix result node count, and, recursively, fix all its children
`protected abstract void` | `singleNodeFix(FacetResultNode facetResNode, ScoredDocIDs docIds, double samplingRatio)` Fix the given node's value.

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

Constructor Detail

### SampleFixer

    public SampleFixer()

Method Detail

### fixResult

    public void fixResult(ScoredDocIDs origDocIds,
                          FacetResult fres,
                          double samplingRatio)
                   throws IOException

  Alter the input result, fixing it to account for the sampling. This implementation can compute accurate or estimated counts for the sampled facets. For example, a faster correction could just multiply by a compensating factor.

  Parameters:
    `origDocIds` - full set of matching documents.
    `fres` - sample result to be fixed.
  Throws:
    `IOException` - If there is a low-level I/O error.

### fixResultNode

    protected void fixResultNode(FacetResultNode facetResNode,
                                 ScoredDocIDs docIds,
                                 double samplingRatio)
                          throws IOException

  Fix result node count, and, recursively, fix all its children

  Parameters:
    `facetResNode` - result node to be fixed
    `docIds` - docids in effect
  Throws:
    `IOException` - If there is a low-level I/O error.

### singleNodeFix

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

  Fix the given node's value.

  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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