LUCENE-2504: fix FC.setNextReader ignores

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@996021 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-09-11 00:14:17 +00:00
parent 992f0027a0
commit d7179da0b2
1 changed files with 4 additions and 5 deletions

View File

@ -288,8 +288,8 @@ class TopGroupCollector extends Collector {
docValues = vs.getValues(context, reader);
filler = docValues.getValueFiller();
mval = filler.getValue();
for (FieldComparator fc : comparators)
fc.setNextReader(reader, docBase);
for (int i=0; i<comparators.length; i++)
comparators[i] = comparators[i].setNextReader(reader, docBase);
}
@Override
@ -464,9 +464,8 @@ class TopGroupSortCollector extends TopGroupCollector {
super.setNextReader(reader, docBase);
this.reader = reader;
for (SearchGroup searchGroup : groupMap.values()) {
for (FieldComparator fc : searchGroup.sortGroupComparators) {
fc.setNextReader(reader, docBase);
}
for (int i=0; i<searchGroup.sortGroupComparators.length; i++)
searchGroup.sortGroupComparators[i] = searchGroup.sortGroupComparators[i].setNextReader(reader, docBase);
}
}