public class SortedSetDocValuesAccumulator extends FacetsAccumulator
FacetsAccumulator
that uses previously
indexed SortedSetDocValuesFacetFields
to perform faceting,
without require a separate taxonomy index. Faceting is
a bit slower (~25%), and there is added cost on every
IndexReader
open to create a new SortedSetDocValuesReaderState
. Furthermore, this does
not support hierarchical facets; only flat (dimension +
label) facets, but it uses quite a bit less RAM to do so.facetArrays, indexReader, searchParams, taxonomyReader
Constructor and Description |
---|
SortedSetDocValuesAccumulator(FacetSearchParams fsp,
SortedSetDocValuesReaderState state) |
Modifier and Type | Method and Description |
---|---|
List<FacetResult> |
accumulate(List<FacetsCollector.MatchingDocs> matchingDocs)
Used by
FacetsCollector to build the list of facet results that match the facet requests that were
given in the constructor. |
FacetsAggregator |
getAggregator()
Returns the
FacetsAggregator to use for aggregating the categories
found in the result documents. |
create, createFacetResultsHandler, emptyResult, getCategoryLists
public SortedSetDocValuesAccumulator(FacetSearchParams fsp, SortedSetDocValuesReaderState state) throws IOException
IOException
public FacetsAggregator getAggregator()
FacetsAccumulator
FacetsAggregator
to use for aggregating the categories
found in the result documents. The default implementation returns
CountingFacetsAggregator
, or FastCountingFacetsAggregator
if all categories can be decoded with DGapVInt8IntDecoder
.getAggregator
in class FacetsAccumulator
public List<FacetResult> accumulate(List<FacetsCollector.MatchingDocs> matchingDocs) throws IOException
FacetsAccumulator
FacetsCollector
to build the list of facet results
that match the facet requests
that were
given in the constructor.accumulate
in class FacetsAccumulator
matchingDocs
- the documents that matched the query, per-segment.IOException
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.