Package org.apache.lucene.search
Class CachingCollector.NoScoreCachingCollector
- java.lang.Object
-
- org.apache.lucene.search.FilterCollector
-
- org.apache.lucene.search.CachingCollector
-
- org.apache.lucene.search.CachingCollector.NoScoreCachingCollector
-
- All Implemented Interfaces:
Collector
- Direct Known Subclasses:
CachingCollector.ScoreCachingCollector
- Enclosing class:
- CachingCollector
private static class CachingCollector.NoScoreCachingCollector extends CachingCollector
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<LeafReaderContext>contexts(package private) java.util.List<int[]>docs(package private) CachingCollector.NoScoreCachingLeafCollectorlastCollector(package private) intmaxDocsToCache-
Fields inherited from class org.apache.lucene.search.FilterCollector
in
-
-
Constructor Summary
Constructors Constructor Description NoScoreCachingCollector(Collector in, int maxDocsToCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcollect(LeafCollector collector, int i)LeafCollectorgetLeafCollector(LeafReaderContext context)Create a newcollectorto collect the given context.protected voidinvalidate()protected voidpostCollect(CachingCollector.NoScoreCachingLeafCollector collector)private voidpostCollection()voidreplay(Collector other)Replays the cached doc IDs (and scores) to the given Collector.protected CachingCollector.NoScoreCachingLeafCollectorwrap(LeafCollector in, int maxDocsToCache)-
Methods inherited from class org.apache.lucene.search.CachingCollector
create, create, create, isCached
-
Methods inherited from class org.apache.lucene.search.FilterCollector
scoreMode, toString
-
-
-
-
Field Detail
-
contexts
java.util.List<LeafReaderContext> contexts
-
docs
java.util.List<int[]> docs
-
maxDocsToCache
int maxDocsToCache
-
lastCollector
CachingCollector.NoScoreCachingLeafCollector lastCollector
-
-
Constructor Detail
-
NoScoreCachingCollector
NoScoreCachingCollector(Collector in, int maxDocsToCache)
-
-
Method Detail
-
wrap
protected CachingCollector.NoScoreCachingLeafCollector wrap(LeafCollector in, int maxDocsToCache)
-
getLeafCollector
public LeafCollector getLeafCollector(LeafReaderContext context) throws java.io.IOException
Description copied from interface:CollectorCreate a newcollectorto collect the given context.- Specified by:
getLeafCollectorin interfaceCollector- Overrides:
getLeafCollectorin classFilterCollector- Parameters:
context- next atomic reader context- Throws:
java.io.IOException
-
invalidate
protected void invalidate()
-
postCollect
protected void postCollect(CachingCollector.NoScoreCachingLeafCollector collector)
-
postCollection
private void postCollection()
-
collect
protected void collect(LeafCollector collector, int i) throws java.io.IOException
- Throws:
java.io.IOException
-
replay
public void replay(Collector other) throws java.io.IOException
Description copied from class:CachingCollectorReplays the cached doc IDs (and scores) to the given Collector. If this instance does not cache scores, then Scorer is not set onother.setScoreras well as scores are not replayed.- Specified by:
replayin classCachingCollector- Throws:
java.io.IOException
-
-