public class SumFloatAssociationFacetsAggregator extends Object implements FacetsAggregator
FacetsAggregator
which computes the weight of a category as the sum
of the float values associated with it in the result documents. Assumes that
the association encoded for each ordinal is CategoryFloatAssociation
.
NOTE: this aggregator does not support
rollupValues(FacetRequest, int, int[], int[], FacetArrays)
. It only
aggregates the categories for which you added a CategoryAssociation
.
Constructor and Description |
---|
SumFloatAssociationFacetsAggregator() |
Modifier and Type | Method and Description |
---|---|
void |
aggregate(FacetsCollector.MatchingDocs matchingDocs,
CategoryListParams clp,
FacetArrays facetArrays)
Aggregate the facets found in the given matching documents.
|
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 void aggregate(FacetsCollector.MatchingDocs matchingDocs, CategoryListParams clp, FacetArrays facetArrays) throws IOException
FacetsAggregator
aggregate
in interface FacetsAggregator
IOException
public boolean requiresDocScores()
FacetsAggregator
true
if this aggregator requires document scores.requiresDocScores
in interface FacetsAggregator
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
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.