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.SimpleCollector
A simple delegating collector where one can set the delegate after creation
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.lucene.index.LeafReaderContext
context
protected org.apache.lucene.search.Collector
delegate
protected int
docBase
protected org.apache.lucene.search.LeafCollector
leafDelegate
protected org.apache.lucene.search.Scorable
scorer
static int
setLastDelegateCount
-
Constructor Summary
Constructors Constructor Description DelegatingCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collect(int doc)
protected void
doSetNextReader(org.apache.lucene.index.LeafReaderContext context)
void
finish()
org.apache.lucene.search.Collector
getDelegate()
org.apache.lucene.search.ScoreMode
scoreMode()
void
setDelegate(org.apache.lucene.search.Collector delegate)
void
setLastDelegate(org.apache.lucene.search.Collector delegate)
Sets the last delegate in a chain of DelegatingCollectorsvoid
setScorer(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:
setScorer
in interfaceorg.apache.lucene.search.LeafCollector
- Overrides:
setScorer
in 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:
collect
in interfaceorg.apache.lucene.search.LeafCollector
- Specified by:
collect
in classorg.apache.lucene.search.SimpleCollector
- Throws:
IOException
-
doSetNextReader
protected void doSetNextReader(org.apache.lucene.index.LeafReaderContext context) throws IOException
- Overrides:
doSetNextReader
in classorg.apache.lucene.search.SimpleCollector
- Throws:
IOException
-
finish
public void finish() throws IOException
- Throws:
IOException
-
-