make stuff work

This commit is contained in:
fjy 2014-03-10 12:19:58 -07:00
parent 7b0d2f45bc
commit 6ce5266aca
1 changed files with 14 additions and 8 deletions

View File

@ -241,21 +241,27 @@ 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);
}
while (baseIter.hasNext()) {
currEntry.set(baseIter.next());
if (filterMatcher.matches()) {
break;
}
while (baseIter.hasNext()) {
currEntry.set(baseIter.next());
if (filterMatcher.matches()) {
return;
numAdvanced++;
}
numAdvanced++;
}
done = cursorMap.size() == 0 || !baseIter.hasNext();
}
@Override