org.apache.lucene.facet.search

## Class SumScoreFacetsAggregator

- java.lang.Object
- - org.apache.lucene.facet.search.SumScoreFacetsAggregator

All Implemented Interfaces:
  FacetsAggregator

    public class SumScoreFacetsAggregator
    extends Object
    implements FacetsAggregator

A `FacetsAggregator` which updates the weight of a category by summing the scores of documents it was found in.

### Constructor Summary

Constructors
Constructor and Description
`SumScoreFacetsAggregator()`

### Method Summary

Methods
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SumScoreFacetsAggregator

    public SumScoreFacetsAggregator()

### Method Detail

#### aggregate

    public void aggregate(FacetsCollector.MatchingDocs matchingDocs,
                 CategoryListParams clp,
                 FacetArrays facetArrays)
                   throws IOException

Description copied from interface: `FacetsAggregator`
Aggregate the facets found in the given matching documents.

Specified by:
  `aggregate` in interface `FacetsAggregator`
Throws:
  `IOException`

#### rollupValues

    public void rollupValues(FacetRequest fr,
                    int ordinal,
                    int[] children,
                    int[] siblings,
                    FacetArrays facetArrays)

Description copied from interface: `FacetsAggregator`
Rollup the values of the given ordinal. This method is called when a category was indexed with `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.

Specified by:
  `rollupValues` in interface `FacetsAggregator`

#### requiresDocScores

    public boolean requiresDocScores()

Description copied from interface: `FacetsAggregator`
Returns `true` if this aggregator requires document scores.

Specified by:
  `requiresDocScores` in interface `FacetsAggregator`