SOLR-2432: fix useFilterForSortedQuery which was broken by LUCENE-2831

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1090913 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2011-04-11 00:12:29 +00:00
parent bcd2440a88
commit 3309b5c585
1 changed files with 3 additions and 5 deletions

View File

@ -1593,14 +1593,12 @@ public class SolrIndexSearcher extends IndexSearcher implements SolrInfoMBean {
DocIterator iter = set.iterator();
int base=0;
int end=0;
int readerIndex = -1;
int readerIndex = 0;
AtomicReaderContext leaf = null;
for (int i = 0; i < leafContexts.length; i++) {
while (iter.hasNext()) {
int doc = iter.nextDoc();
while (doc>=end) {
leaf = leafContexts[i++];
AtomicReaderContext leaf = leafContexts[readerIndex++];
base = leaf.docBase;
end = base + leaf.reader.maxDoc();
topCollector.setNextReader(leaf);