private class CachingCollector.ScoreCachingLeafCollector extends CachingCollector.NoScoreCachingLeafCollector
Modifier and Type | Field and Description |
---|---|
(package private) Scorable |
scorer |
(package private) float[] |
scores |
docCount, docs, maxDocsToCache
in
Constructor and Description |
---|
ScoreCachingLeafCollector(LeafCollector in,
int maxDocsToCache) |
Modifier and Type | Method and 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 to
LeafCollector.collect(int) . |
cachedDocs, collect, hasCache
toString
Scorable scorer
float[] scores
ScoreCachingLeafCollector(LeafCollector in, int maxDocsToCache)
public void setScorer(Scorable scorer) throws java.io.IOException
LeafCollector
LeafCollector.collect(int)
. Implementations
that need the score of the current document (passed-in to
LeafCollector.collect(int)
), should save the passed-in Scorer and call
scorer.score() when needed.setScorer
in interface LeafCollector
setScorer
in class FilterLeafCollector
java.io.IOException
protected void grow(int newLen)
grow
in class CachingCollector.NoScoreCachingLeafCollector
protected void invalidate()
invalidate
in class CachingCollector.NoScoreCachingLeafCollector
protected void buffer(int doc) throws java.io.IOException
buffer
in class CachingCollector.NoScoreCachingLeafCollector
java.io.IOException
float[] cachedScores()