Class AssociationIntSumAggregator
- java.lang.Object
-
- org.apache.lucene.facet.search.aggregator.association.AssociationIntSumAggregator
-
- All Implemented Interfaces:
Aggregator
public class AssociationIntSumAggregator extends Object implements Aggregator
AnAggregator
which updates the weight of a category by summing the weights of the integer association it finds for every document.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description protected AssociationsPayloadIterator
associationsPayloadIterator
protected String
field
protected int[]
sumArray
-
Constructor Summary
Constructors Constructor Description AssociationIntSumAggregator(String field, org.apache.lucene.index.IndexReader reader, int[] sumArray)
AssociationIntSumAggregator(org.apache.lucene.index.IndexReader reader, int[] sumArray)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 followingAggregator.aggregate(int)
calls will pertain to.
-
-
-
Field Detail
-
field
protected final String field
-
sumArray
protected final int[] sumArray
-
associationsPayloadIterator
protected final AssociationsPayloadIterator associationsPayloadIterator
-
-
Constructor Detail
-
AssociationIntSumAggregator
public AssociationIntSumAggregator(org.apache.lucene.index.IndexReader reader, int[] sumArray) throws IOException
- Throws:
IOException
-
AssociationIntSumAggregator
public AssociationIntSumAggregator(String field, org.apache.lucene.index.IndexReader reader, int[] 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 byAggregator.setNextDoc(int, float)
.- Specified by:
aggregate
in interfaceAggregator
-
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 followingAggregator.aggregate(int)
calls will pertain to.- Specified by:
setNextDoc
in interfaceAggregator
- Throws:
IOException
-
-