Module org.apache.lucene.core
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
FieldsFields inherited from class org.apache.lucene.search.CachingCollector.NoScoreCachingLeafCollector
collector, docCount, docs, maxDocsToCache
Fields inherited from class org.apache.lucene.search.FilterLeafCollector
in
-
Constructor Summary
ConstructorsConstructorDescriptionScoreCachingLeafCollector
(LeafCollector in, int maxDocsToCache, CachingCollector.ScoreCachingCollector collector) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
buffer
(int doc) (package private) float[]
protected void
grow
(int newLen) protected void
protected void
void
Called before successive calls toLeafCollector.collect(int)
.Methods inherited from class org.apache.lucene.search.CachingCollector.NoScoreCachingLeafCollector
cachedDocs, collect, finish, 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
collect, competitiveIterator
-
Field Details
-
scorer
Scorable scorer -
scores
float[] scores
-
-
Constructor Details
-
ScoreCachingLeafCollector
ScoreCachingLeafCollector(LeafCollector in, int maxDocsToCache, CachingCollector.ScoreCachingCollector collector)
-
-
Method Details
-
setScorer
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:
IOException
-
grow
protected void grow(int newLen) - Overrides:
grow
in classCachingCollector.NoScoreCachingLeafCollector
-
invalidate
protected void invalidate()- Overrides:
invalidate
in classCachingCollector.NoScoreCachingLeafCollector
-
buffer
- Overrides:
buffer
in classCachingCollector.NoScoreCachingLeafCollector
- Throws:
IOException
-
cachedScores
float[] cachedScores() -
postCollect
protected void postCollect()- Overrides:
postCollect
in classCachingCollector.NoScoreCachingLeafCollector
-