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