public class AssociationIntSumAggregator extends Object implements Aggregator
Aggregator
which computes the weight of a category as the sum of
the integer values associated with it in the result documents.Modifier and Type | Field and Description |
---|---|
protected IntAssociationsPayloadIterator |
associations |
protected String |
field |
protected int[] |
sumArray |
Constructor and Description |
---|
AssociationIntSumAggregator(int[] sumArray) |
AssociationIntSumAggregator(String field,
int[] 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 int[] sumArray
protected final IntAssociationsPayloadIterator associations
public AssociationIntSumAggregator(int[] sumArray) throws IOException
IOException
public AssociationIntSumAggregator(String field, int[] sumArray) throws IOException
IOException
public void aggregate(int docID, float score, IntsRef ordinals) throws IOException
Aggregator
aggregate
in interface Aggregator
IOException
public boolean setNextReader(AtomicReaderContext context) throws IOException
Aggregator
AtomicReaderContext
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 Aggregator
IOException
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.