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) Scorablescorer(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 voidbuffer(int doc)(package private) float[]cachedScores()protected voidgrow(int newLen)protected voidinvalidate()voidsetScorer(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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.search.LeafCollector
competitiveIterator
-
-
-
-
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:LeafCollectorCalled 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:
setScorerin interfaceLeafCollector- Overrides:
setScorerin classFilterLeafCollector- Throws:
java.io.IOException
-
grow
protected void grow(int newLen)
- Overrides:
growin classCachingCollector.NoScoreCachingLeafCollector
-
invalidate
protected void invalidate()
- Overrides:
invalidatein classCachingCollector.NoScoreCachingLeafCollector
-
buffer
protected void buffer(int doc) throws java.io.IOException- Overrides:
bufferin classCachingCollector.NoScoreCachingLeafCollector- Throws:
java.io.IOException
-
cachedScores
float[] cachedScores()
-
-