org.apache.lucene.facet.search
public class PerCategoryListAggregator extends Object implements FacetsAggregator
FacetsAggregator
which invokes the proper aggregator per
CategoryListParams
.
rollupValues(FacetRequest, int, int[], int[], FacetArrays)
is
delegated to the proper aggregator which handles the
CategoryListParams
the given FacetRequest
belongs to.Constructor and Description |
---|
PerCategoryListAggregator(Map<CategoryListParams,FacetsAggregator> aggregators,
FacetIndexingParams fip) |
Modifier and Type | Method and Description |
---|---|
void |
aggregate(FacetsCollector.MatchingDocs matchingDocs,
CategoryListParams clp,
FacetArrays facetArrays)
Aggregate the facets found in the given matching documents.
|
OrdinalValueResolver |
createOrdinalValueResolver(FacetRequest facetRequest,
FacetArrays arrays)
Creates the appropriate
OrdinalValueResolver for this aggregator
and the given FacetRequest . |
boolean |
requiresDocScores()
Returns
true if this aggregator requires document scores. |
void |
rollupValues(FacetRequest fr,
int ordinal,
int[] children,
int[] siblings,
FacetArrays facetArrays)
Rollup the values of the given ordinal.
|
public PerCategoryListAggregator(Map<CategoryListParams,FacetsAggregator> aggregators, FacetIndexingParams fip)
public void aggregate(FacetsCollector.MatchingDocs matchingDocs, CategoryListParams clp, FacetArrays facetArrays) throws IOException
FacetsAggregator
aggregate
in interface FacetsAggregator
IOException
public void rollupValues(FacetRequest fr, int ordinal, int[] children, int[] siblings, FacetArrays facetArrays)
FacetsAggregator
CategoryListParams.OrdinalPolicy.NO_PARENTS
. The given
ordinal is the requested category, and you should use the children and
siblings arrays to traverse its sub-tree.rollupValues
in interface FacetsAggregator
public boolean requiresDocScores()
FacetsAggregator
true
if this aggregator requires document scores.requiresDocScores
in interface FacetsAggregator
public OrdinalValueResolver createOrdinalValueResolver(FacetRequest facetRequest, FacetArrays arrays)
FacetsAggregator
OrdinalValueResolver
for this aggregator
and the given FacetRequest
. The request is passed so that compound
aggregators can return the correct OrdinalValueResolver
.createOrdinalValueResolver
in interface FacetsAggregator
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.