AdaptiveFacetsAccumulator (Lucene 3.6.2 API)
Keywords: org.apache.lucene.facet.search.AdaptiveFacetsAccumulator class

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

## org.apache.lucene.facet.search
Class AdaptiveFacetsAccumulator

    java.lang.Object
      org.apache.lucene.facet.search.FacetsAccumulator
          org.apache.lucene.facet.search.StandardFacetsAccumulator
              org.apache.lucene.facet.search.AdaptiveFacetsAccumulator

    public final class AdaptiveFacetsAccumulator

extends StandardFacetsAccumulator

`FacetsAccumulator` whose behavior regarding complements, sampling, etc. is not set up front but rather is determined at accumulation time according to the statistics of the accumulated set of documents and the index.

Note: Sampling accumulation (Accumulation over a sampled-set of the results), does not guarantee accurate values for `FacetResult.getNumValidDescendants()` & `FacetResultNode.getResidue()`.

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

Field Summary

Fields inherited from class org.apache.lucene.facet.search.StandardFacetsAccumulator
`floatArrayAllocator, intArrayAllocator, isUsingComplements, maxPartitions, partitionSize`

Fields inherited from class org.apache.lucene.facet.search.FacetsAccumulator
`DEFAULT_COMPLEMENT_THRESHOLD, DISABLE_COMPLEMENT, FORCE_COMPLEMENT, indexReader, searchParams, taxonomyReader`

Constructor Summary
`AdaptiveFacetsAccumulator(FacetSearchParams searchParams, org.apache.lucene.index.IndexReader indexReader, TaxonomyReader taxonomyReader)` Create an `AdaptiveFacetsAccumulator`
`AdaptiveFacetsAccumulator(FacetSearchParams searchParams, org.apache.lucene.index.IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)` Create an `AdaptiveFacetsAccumulator`

Method Summary
`List<FacetResult>` | `accumulate(ScoredDocIDs docids)` Accumulate facets over given documents, according to facet requests in effect.
`Sampler` | `getSampler()`
`void` | `setSampler(Sampler sampler)` Set the sampler.

Methods inherited from class org.apache.lucene.facet.search.StandardFacetsAccumulator
`actualDocsToAccumulate, getCategoryListMap, getTotalCountsFactor, shouldComplement`

Methods inherited from class org.apache.lucene.facet.search.FacetsAccumulator
`getComplementThreshold, isAllowLabeling, mayComplement, setAllowLabeling, setComplementThreshold`

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

Constructor Detail

### AdaptiveFacetsAccumulator

    public AdaptiveFacetsAccumulator(FacetSearchParams searchParams,
                                     org.apache.lucene.index.IndexReader indexReader,
                                     TaxonomyReader taxonomyReader)

  Create an `AdaptiveFacetsAccumulator`

  See Also:
    `StandardFacetsAccumulator.StandardFacetsAccumulator(FacetSearchParams, IndexReader, TaxonomyReader)`

### AdaptiveFacetsAccumulator

    public AdaptiveFacetsAccumulator(FacetSearchParams searchParams,
                                     org.apache.lucene.index.IndexReader indexReader,
                                     TaxonomyReader taxonomyReader,
                                     IntArrayAllocator intArrayAllocator,
                                     FloatArrayAllocator floatArrayAllocator)

  Create an `AdaptiveFacetsAccumulator`

  See Also:
    `StandardFacetsAccumulator.StandardFacetsAccumulator(FacetSearchParams, IndexReader, TaxonomyReader, IntArrayAllocator, FloatArrayAllocator)`

Method Detail

### setSampler

    public void setSampler(Sampler sampler)

  Set the sampler.

  Parameters:
    `sampler` - sampler to set

### accumulate

    public List<FacetResult> accumulate(ScoredDocIDs docids)
                                 throws IOException

  Description copied from class: `FacetsAccumulator`
  Accumulate facets over given documents, according to facet requests in effect.

  Overrides:
    `accumulate` in class `StandardFacetsAccumulator`
  Parameters:
    `docids` - documents (and their scores) for which facets are Accumulated.
  Returns:
    Accumulated facets.
  Throws:
    `IOException` - on error.

### getSampler

    public final Sampler getSampler()

  Returns:
    the sampler in effect

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