Class DelegatingCollector

  • All Implemented Interfaces:
    org.apache.lucene.search.Collector, org.apache.lucene.search.LeafCollector

    public class DelegatingCollector
    extends org.apache.lucene.search.SimpleCollector
    A simple delegating collector where one can set the delegate after creation
    • Field Detail

      • setLastDelegateCount

        public static int setLastDelegateCount
      • delegate

        protected org.apache.lucene.search.Collector delegate
      • leafDelegate

        protected org.apache.lucene.search.LeafCollector leafDelegate
      • scorer

        protected org.apache.lucene.search.Scorable scorer
      • context

        protected org.apache.lucene.index.LeafReaderContext context
      • docBase

        protected int docBase
    • Constructor Detail

      • DelegatingCollector

        public DelegatingCollector()
    • Method Detail

      • getDelegate

        public org.apache.lucene.search.Collector getDelegate()
      • setDelegate

        public void setDelegate​(org.apache.lucene.search.Collector delegate)
      • setLastDelegate

        public void setLastDelegate​(org.apache.lucene.search.Collector delegate)
        Sets the last delegate in a chain of DelegatingCollectors
      • setScorer

        public void setScorer​(org.apache.lucene.search.Scorable scorer)
                       throws IOException
        Specified by:
        setScorer in interface org.apache.lucene.search.LeafCollector
        Overrides:
        setScorer in class org.apache.lucene.search.SimpleCollector
        Throws:
        IOException
      • scoreMode

        public org.apache.lucene.search.ScoreMode scoreMode()
      • collect

        public void collect​(int doc)
                     throws IOException
        Specified by:
        collect in interface org.apache.lucene.search.LeafCollector
        Specified by:
        collect in class org.apache.lucene.search.SimpleCollector
        Throws:
        IOException
      • doSetNextReader

        protected void doSetNextReader​(org.apache.lucene.index.LeafReaderContext context)
                                throws IOException
        Overrides:
        doSetNextReader in class org.apache.lucene.search.SimpleCollector
        Throws:
        IOException