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.association
Class AssociationFloatSumAggregator

    java.lang.Object
      org.apache.lucene.facet.search.aggregator.association.AssociationFloatSumAggregator

All Implemented Interfaces:
  Aggregator

    public class AssociationFloatSumAggregator

extends Object
implements Aggregator

An `Aggregator` which updates the weight of a category by summing the weights of the float association it finds for every document.

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

Field Summary
`protected AssociationsPayloadIterator` | `associationsPayloadIterator`
`protected String` | `field`
`protected float[]` | `sumArray`

Constructor Summary
`AssociationFloatSumAggregator(org.apache.lucene.index.IndexReader reader, float[] sumArray)`
`AssociationFloatSumAggregator(String field, org.apache.lucene.index.IndexReader reader, float[] sumArray)`

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

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### field

    protected final String field

### sumArray

    protected final float[] sumArray

### associationsPayloadIterator

    protected final AssociationsPayloadIterator associationsPayloadIterator

Constructor Detail

### AssociationFloatSumAggregator

    public AssociationFloatSumAggregator(org.apache.lucene.index.IndexReader reader,
                                         float[] sumArray)
                                  throws IOException

Throws:
  `IOException`

### AssociationFloatSumAggregator

    public AssociationFloatSumAggregator(String field,
                                         org.apache.lucene.index.IndexReader reader,
                                         float[] sumArray)
                                  throws IOException

Throws:
  `IOException`

Method Detail

### aggregate

    public void aggregate(int ordinal)

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

  Specified by:
    `aggregate` in interface `Aggregator`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### setNextDoc

    public void setNextDoc(int docid,
                           float score)
                    throws IOException

  Description copied from interface: `Aggregator`
  Specify the document (and its score in the search) that the following `Aggregator.aggregate(int)` calls will pertain to.

  Specified by:
    `setNextDoc` in interface `Aggregator`
  Throws:
    `IOException`

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