Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.facet.search.aggregator
Interface Aggregator

All Known Implementing Classes:
  AssociationFloatSumAggregator, AssociationIntSumAggregator, ComplementCountingAggregator, CountingAggregator, ScoringAggregator

    public interface Aggregator

An Aggregator is the analogue of Lucene's Collector (see `Collector`), for processing the categories belonging to a certain document. The Aggregator is responsible for doing whatever it wishes with the categories it is fed, e.g., counting the number of times that each category appears, or performing some computation on their association values.

Much of the function of an Aggregator implementation is not described by this interface. This includes the constructor and getter methods to retrieve the results of the aggregation.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
`void` | `aggregate(int ordinal)` Collect (and do whatever an implementation deems appropriate) the category given by its ordinal.
`void` | `setNextDoc(int docid, float score)` Specify the document (and its score in the search) that the following `aggregate(int)` calls will pertain to.

Method Detail

### setNextDoc

    void setNextDoc(int docid,
                    float score)
                    throws IOException

  Specify the document (and its score in the search) that the following `aggregate(int)` calls will pertain to.

  Throws:
    `IOException`

### aggregate

    void aggregate(int ordinal)

  Collect (and do whatever an implementation deems appropriate) the category given by its ordinal. This category belongs to a document given earlier by `setNextDoc(int, float)`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD