Class ScoringAggregator

  • All Implemented Interfaces:
    Aggregator

    public class ScoringAggregator
    extends Object
    implements Aggregator
    An Aggregator which updates the weight of a category according to the scores of the documents it was found in.
    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Constructor Detail

      • ScoringAggregator

        public ScoringAggregator​(float[] counterArray)
    • 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 by Aggregator.setNextDoc(int, float).
        Specified by:
        aggregate in interface Aggregator
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • setNextDoc

        public void setNextDoc​(int docid,
                               float score)
        Description copied from interface: Aggregator
        Specify the document (and its score in the search) that the following Aggregator.aggregate(int) calls will pertain to.
        Specified by:
        setNextDoc in interface Aggregator