|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.facet.search.FacetsAccumulator
public class FacetsAccumulator
Driver for Accumulating facets of faceted search requests over given documents.
Field Summary | |
---|---|
FacetArrays |
facetArrays
|
IndexReader |
indexReader
|
FacetSearchParams |
searchParams
|
TaxonomyReader |
taxonomyReader
|
Constructor Summary | |
---|---|
FacetsAccumulator(FacetSearchParams searchParams,
IndexReader indexReader,
TaxonomyReader taxonomyReader)
Initializes the accumulator with the given search params, index reader and taxonomy reader. |
|
FacetsAccumulator(FacetSearchParams searchParams,
IndexReader indexReader,
TaxonomyReader taxonomyReader,
FacetArrays facetArrays)
Initializes the accumulator with the given parameters as well as FacetArrays . |
Method Summary | |
---|---|
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. |
static FacetsAccumulator |
create(FacetSearchParams fsp,
IndexReader indexReader,
TaxonomyReader taxoReader)
Creates an appropriate FacetsAccumulator ,
returning FacetsAccumulator when all requests
are CountFacetRequest and only one partition is
in use, otherwise StandardFacetsAccumulator . |
protected FacetResultsHandler |
createFacetResultsHandler(FacetRequest fr)
Creates a FacetResultsHandler that matches the given
FacetRequest . |
FacetsAggregator |
getAggregator()
Returns the FacetsAggregator to use for aggregating the categories
found in the result documents. |
protected Set<CategoryListParams> |
getCategoryLists()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final TaxonomyReader taxonomyReader
public final IndexReader indexReader
public final FacetArrays facetArrays
public FacetSearchParams searchParams
Constructor Detail |
---|
public FacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
FacetArrays
,
which do not support reuse. If you want to use ReusingFacetArrays
,
you should use the
FacetsAccumulator(FacetSearchParams, IndexReader, TaxonomyReader, FacetArrays)
constructor.
public FacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, FacetArrays facetArrays)
FacetArrays
. Note that the accumulator doesn't call
FacetArrays.free()
. If you require that (only makes sense if you
use ReusingFacetArrays
, you should do it after you've finished with
the accumulator.
Method Detail |
---|
public static FacetsAccumulator create(FacetSearchParams fsp, IndexReader indexReader, TaxonomyReader taxoReader)
FacetsAccumulator
,
returning FacetsAccumulator
when all requests
are CountFacetRequest
and only one partition is
in use, otherwise StandardFacetsAccumulator
.
public FacetsAggregator getAggregator()
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
.
protected FacetResultsHandler createFacetResultsHandler(FacetRequest fr)
FacetResultsHandler
that matches the given
FacetRequest
.
protected Set<CategoryListParams> getCategoryLists()
public List<FacetResult> accumulate(List<FacetsCollector.MatchingDocs> matchingDocs) throws IOException
FacetsCollector
to build the list of facet results
that match the facet requests
that were
given in the constructor.
matchingDocs
- the documents that matched the query, per-segment.
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |