public class AssociationIntSumAggregator extends Object implements Aggregator
Aggregator which updates the weight of a category by summing the
weights of the integer association it finds for every document.| Modifier and Type | Field and Description |
|---|---|
protected AssociationsPayloadIterator |
associationsPayloadIterator |
protected String |
field |
protected int[] |
sumArray |
| Constructor and Description |
|---|
AssociationIntSumAggregator(IndexReader reader,
int[] sumArray) |
AssociationIntSumAggregator(String field,
IndexReader reader,
int[] sumArray) |
| Modifier and Type | Method and Description |
|---|---|
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. |
protected final String field
protected final int[] sumArray
protected final AssociationsPayloadIterator associationsPayloadIterator
public AssociationIntSumAggregator(IndexReader reader, int[] sumArray) throws IOException
IOExceptionpublic AssociationIntSumAggregator(String field, IndexReader reader, int[] sumArray) throws IOException
IOExceptionpublic void aggregate(int ordinal)
AggregatorAggregator.setNextDoc(int, float).aggregate in interface Aggregatorpublic void setNextDoc(int docid,
float score)
throws IOException
AggregatorAggregator.aggregate(int) calls will pertain to.setNextDoc in interface AggregatorIOException