CachingCollector must setScorer per segment

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1130852 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2011-06-02 22:21:29 +00:00
parent 5d571565f5
commit 710e630e91
1 changed files with 1 additions and 1 deletions

View File

@ -168,10 +168,10 @@ public abstract class CachingCollector extends Collector {
int curUpto = 0; int curUpto = 0;
int curBase = 0; int curBase = 0;
int chunkUpto = 0; int chunkUpto = 0;
other.setScorer(cachedScorer);
curDocs = EMPTY_INT_ARRAY; curDocs = EMPTY_INT_ARRAY;
for (SegStart seg : cachedSegs) { for (SegStart seg : cachedSegs) {
other.setNextReader(seg.readerContext); other.setNextReader(seg.readerContext);
other.setScorer(cachedScorer);
while (curBase + curUpto < seg.end) { while (curBase + curUpto < seg.end) {
if (curUpto == curDocs.length) { if (curUpto == curDocs.length) {
curBase += curDocs.length; curBase += curDocs.length;