Class CountingAggregator
- java.lang.Object
-
- org.apache.lucene.facet.search.aggregator.CountingAggregator
-
- All Implemented Interfaces:
Aggregator
- Direct Known Subclasses:
ComplementCountingAggregator
public class CountingAggregator extends Object implements Aggregator
A CountingAggregator updates a counter array with the size of the whole taxonomy, counting the number of times each category appears in the given set of documents.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]counterArray
-
Constructor Summary
Constructors Constructor Description CountingAggregator(int[] counterArray)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaggregate(int ordinal)Collect (and do whatever an implementation deems appropriate) the category given by its ordinal.booleanequals(Object obj)inthashCode()voidsetNextDoc(int docid, float score)Specify the document (and its score in the search) that the followingAggregator.aggregate(int)calls will pertain to.
-
-
-
Method Detail
-
aggregate
public void aggregate(int ordinal)
Description copied from interface:AggregatorCollect (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:
aggregatein interfaceAggregator
-
setNextDoc
public void setNextDoc(int docid, float score)Description copied from interface:AggregatorSpecify the document (and its score in the search) that the followingAggregator.aggregate(int)calls will pertain to.- Specified by:
setNextDocin interfaceAggregator
-
-