add fix for II

This commit is contained in:
fjy 2014-03-10 12:01:49 -07:00
parent 1f62257ac2
commit 2db73998b9
1 changed files with 8 additions and 10 deletions

View File

@ -241,19 +241,17 @@ public class IncrementalIndexStorageAdapter implements StorageAdapter
if (numAdvanced == -1) {
numAdvanced = 0;
while (baseIter.hasNext()) {
currEntry.set(baseIter.next());
if (filterMatcher.matches()) {
return;
}
numAdvanced++;
}
} else {
Iterators.advance(baseIter, numAdvanced);
if (baseIter.hasNext()) {
currEntry.set(baseIter.next());
}
while (baseIter.hasNext()) {
currEntry.set(baseIter.next());
if (filterMatcher.matches()) {
return;
}
numAdvanced++;
}
done = cursorMap.size() == 0 || !baseIter.hasNext();