public class AssociationFloatSumAggregator extends Object implements Aggregator
Aggregator which computes the weight of a category as the sum of
the float values associated with it in the result documents.| Modifier and Type | Field and Description |
|---|---|
protected FloatAssociationsPayloadIterator |
associations |
protected String |
field |
protected float[] |
sumArray |
| Constructor and Description |
|---|
AssociationFloatSumAggregator(float[] sumArray) |
AssociationFloatSumAggregator(String field,
float[] sumArray) |
| Modifier and Type | Method and Description |
|---|---|
void |
aggregate(int docID,
float score,
IntsRef ordinals)
Aggregate the ordinals of the given document ID (and its score).
|
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
setNextReader(AtomicReaderContext context)
Sets the
AtomicReaderContext for which
Aggregator.aggregate(int, float, IntsRef) calls will be made. |
protected final String field
protected final float[] sumArray
protected final FloatAssociationsPayloadIterator associations
public AssociationFloatSumAggregator(float[] sumArray)
throws IOException
IOExceptionpublic AssociationFloatSumAggregator(String field, float[] sumArray) throws IOException
IOExceptionpublic void aggregate(int docID,
float score,
IntsRef ordinals)
throws IOException
Aggregatoraggregate in interface AggregatorIOExceptionpublic boolean setNextReader(AtomicReaderContext context) throws IOException
AggregatorAtomicReaderContext for which
Aggregator.aggregate(int, float, IntsRef) calls will be made. If this method
returns false, Aggregator.aggregate(int, float, IntsRef) should not be called
for this reader.setNextReader in interface AggregatorIOExceptionCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.