Class GroupReducer<T,​C extends Collector>

    • Constructor Detail

      • GroupReducer

        public GroupReducer()
    • Method Detail

      • needsScores

        public abstract boolean needsScores()
        Whether or not this reducer requires collected documents to be scored
      • newCollector

        protected abstract C newCollector()
        Creates a new Collector for each group
      • getCollector

        public final C getCollector​(T value)
        Get the Collector for a given group
      • collect

        public final void collect​(T value,
                                  int doc)
                           throws java.io.IOException
        Collect a given document into a given group
        Throws:
        java.io.IOException - on error
      • setScorer

        public final void setScorer​(Scorable scorer)
                             throws java.io.IOException
        Set the Scorer on all group collectors
        Throws:
        java.io.IOException