|
|||||||||
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 org.apache.lucene.facet.search.TaxonomyFacetsAccumulator
public class TaxonomyFacetsAccumulator
A FacetsAccumulator
suitable for accumulating categories that were
indexed into a taxonomy index.
Field Summary | |
---|---|
FacetArrays |
facetArrays
|
IndexReader |
indexReader
|
TaxonomyReader |
taxonomyReader
|
Fields inherited from class org.apache.lucene.facet.search.FacetsAccumulator |
---|
searchParams |
Constructor Summary | |
---|---|
TaxonomyFacetsAccumulator(FacetSearchParams searchParams,
IndexReader indexReader,
TaxonomyReader taxonomyReader)
Initializes the accumulator with the given search params, index reader and taxonomy reader. |
|
TaxonomyFacetsAccumulator(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. |
protected FacetResultsHandler |
createFacetResultsHandler(FacetRequest fr,
OrdinalValueResolver resolver)
Creates a FacetResultsHandler that matches the given
FacetRequest , using the OrdinalValueResolver . |
FacetsAggregator |
getAggregator()
Returns the FacetsAggregator to use for aggregating the categories
found in the result documents. |
protected Map<CategoryListParams,List<FacetRequest>> |
groupRequests()
Group all requests that belong to the same CategoryListParams . |
boolean |
requiresDocScores()
Used by FacetsCollector to determine if document scores need to be
collected in addition to matching documents. |
Methods inherited from class org.apache.lucene.facet.search.FacetsAccumulator |
---|
create, create, emptyResult |
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
Constructor Detail |
---|
public TaxonomyFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
FacetArrays
,
which do not support reuse. If you want to use ReusingFacetArrays
,
you should use the
TaxonomyFacetsAccumulator(FacetSearchParams, IndexReader, TaxonomyReader)
constructor.
public TaxonomyFacetsAccumulator(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 |
---|
protected Map<CategoryListParams,List<FacetRequest>> groupRequests()
CategoryListParams
.
public FacetsAggregator getAggregator()
FacetsAggregator
to use for aggregating the categories
found in the result documents.
protected FacetResultsHandler createFacetResultsHandler(FacetRequest fr, OrdinalValueResolver resolver)
FacetResultsHandler
that matches the given
FacetRequest
, using the OrdinalValueResolver
.
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.
accumulate
in class FacetsAccumulator
matchingDocs
- the documents that matched the query, per-segment.
IOException
public boolean requiresDocScores()
FacetsAccumulator
FacetsCollector
to determine if document scores need to be
collected in addition to matching documents.
requiresDocScores
in class FacetsAccumulator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |