Package org.apache.lucene.search
Class CachingCollector.ScoreCachingLeafCollector
- java.lang.Object
-
- org.apache.lucene.search.FilterLeafCollector
-
- org.apache.lucene.search.CachingCollector.NoScoreCachingLeafCollector
-
- org.apache.lucene.search.CachingCollector.ScoreCachingLeafCollector
-
- All Implemented Interfaces:
LeafCollector
- Enclosing class:
- CachingCollector
private class CachingCollector.ScoreCachingLeafCollector extends CachingCollector.NoScoreCachingLeafCollector
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Scorable
scorer
(package private) float[]
scores
-
Fields inherited from class org.apache.lucene.search.CachingCollector.NoScoreCachingLeafCollector
docCount, docs, maxDocsToCache
-
Fields inherited from class org.apache.lucene.search.FilterLeafCollector
in
-
-
Constructor Summary
Constructors Constructor Description ScoreCachingLeafCollector(LeafCollector in, int maxDocsToCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
buffer(int doc)
(package private) float[]
cachedScores()
protected void
grow(int newLen)
protected void
invalidate()
void
setScorer(Scorable scorer)
Called before successive calls toLeafCollector.collect(int)
.-
Methods inherited from class org.apache.lucene.search.CachingCollector.NoScoreCachingLeafCollector
cachedDocs, collect, hasCache
-
Methods inherited from class org.apache.lucene.search.FilterLeafCollector
toString
-
-
-
-
Field Detail
-
scorer
Scorable scorer
-
scores
float[] scores
-
-
Constructor Detail
-
ScoreCachingLeafCollector
ScoreCachingLeafCollector(LeafCollector in, int maxDocsToCache)
-
-
Method Detail
-
setScorer
public void setScorer(Scorable scorer) throws java.io.IOException
Description copied from interface:LeafCollector
Called before successive calls toLeafCollector.collect(int)
. Implementations that need the score of the current document (passed-in toLeafCollector.collect(int)
), should save the passed-in Scorer and call scorer.score() when needed.- Specified by:
setScorer
in interfaceLeafCollector
- Overrides:
setScorer
in classFilterLeafCollector
- Throws:
java.io.IOException
-
grow
protected void grow(int newLen)
- Overrides:
grow
in classCachingCollector.NoScoreCachingLeafCollector
-
invalidate
protected void invalidate()
- Overrides:
invalidate
in classCachingCollector.NoScoreCachingLeafCollector
-
buffer
protected void buffer(int doc) throws java.io.IOException
- Overrides:
buffer
in classCachingCollector.NoScoreCachingLeafCollector
- Throws:
java.io.IOException
-
cachedScores
float[] cachedScores()
-
-