Package org.apache.solr.search
Class DelegatingCollector
- java.lang.Object
-
- org.apache.lucene.search.SimpleCollector
-
- org.apache.solr.search.DelegatingCollector
-
- All Implemented Interfaces:
org.apache.lucene.search.Collector,org.apache.lucene.search.LeafCollector
public class DelegatingCollector extends org.apache.lucene.search.SimpleCollectorA simple delegating collector where one can set the delegate after creation
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.lucene.index.LeafReaderContextcontextprotected org.apache.lucene.search.Collectordelegateprotected intdocBaseprotected org.apache.lucene.search.LeafCollectorleafDelegateprotected org.apache.lucene.search.Scorablescorerstatic intsetLastDelegateCount
-
Constructor Summary
Constructors Constructor Description DelegatingCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollect(int doc)voidcomplete()since 9.4protected voiddoSetNextReader(org.apache.lucene.index.LeafReaderContext context)voidfinish()From Solr 9.4 using Lucene 9.8 onwardsDelegatingCollector.finishclashes with the super class'sLeafCollector.finishmethod.org.apache.lucene.search.CollectorgetDelegate()org.apache.lucene.search.ScoreModescoreMode()voidsetDelegate(org.apache.lucene.search.Collector delegate)voidsetLastDelegate(org.apache.lucene.search.Collector delegate)Sets the last delegate in a chain of DelegatingCollectorsvoidsetScorer(org.apache.lucene.search.Scorable scorer)
-
-
-
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
-
-
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:
setScorerin interfaceorg.apache.lucene.search.LeafCollector- Overrides:
setScorerin classorg.apache.lucene.search.SimpleCollector- Throws:
IOException
-
scoreMode
public org.apache.lucene.search.ScoreMode scoreMode()
-
collect
public void collect(int doc) throws IOException- Specified by:
collectin interfaceorg.apache.lucene.search.LeafCollector- Specified by:
collectin classorg.apache.lucene.search.SimpleCollector- Throws:
IOException
-
doSetNextReader
protected void doSetNextReader(org.apache.lucene.index.LeafReaderContext context) throws IOException- Overrides:
doSetNextReaderin classorg.apache.lucene.search.SimpleCollector- Throws:
IOException
-
finish
public final void finish() throws IOExceptionFrom Solr 9.4 using Lucene 9.8 onwardsDelegatingCollector.finishclashes with the super class'sLeafCollector.finishmethod. Please relocate any finishing logic into theDelegatingCollector.completereplacement completion method.- Throws:
IOException
-
complete
public void complete() throws IOExceptionsince 9.4- Throws:
IOException
-
-