private class CachingCollector.ScoreCachingLeafCollector extends CachingCollector.NoScoreCachingLeafCollector
| Modifier and Type | Field and Description |
|---|---|
(package private) Scorable |
scorer |
(package private) float[] |
scores |
docCount, docs, maxDocsToCachein| 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, hasCachetoStringScorable scorer
float[] scores
ScoreCachingLeafCollector(LeafCollector in, int maxDocsToCache)
public void setScorer(Scorable scorer) throws java.io.IOException
LeafCollectorLeafCollector.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 LeafCollectorsetScorer in class FilterLeafCollectorjava.io.IOExceptionprotected void grow(int newLen)
grow in class CachingCollector.NoScoreCachingLeafCollectorprotected void invalidate()
invalidate in class CachingCollector.NoScoreCachingLeafCollectorprotected void buffer(int doc)
throws java.io.IOException
buffer in class CachingCollector.NoScoreCachingLeafCollectorjava.io.IOExceptionfloat[] cachedScores()