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.NoScoreCachingLeafCollector
lastCollector
(package private) int
maxDocsToCache
-
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 void
collect(LeafCollector collector, int i)
LeafCollector
getLeafCollector(LeafReaderContext context)
Create a newcollector
to collect the given context.protected void
invalidate()
protected void
postCollect(CachingCollector.NoScoreCachingLeafCollector collector)
private void
postCollection()
void
replay(Collector other)
Replays the cached doc IDs (and scores) to the given Collector.protected CachingCollector.NoScoreCachingLeafCollector
wrap(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:Collector
Create a newcollector
to collect the given context.- Specified by:
getLeafCollector
in interfaceCollector
- Overrides:
getLeafCollector
in 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:CachingCollector
Replays the cached doc IDs (and scores) to the given Collector. If this instance does not cache scores, then Scorer is not set onother.setScorer
as well as scores are not replayed.- Specified by:
replay
in classCachingCollector
- Throws:
java.io.IOException
-
-