Nested facet execution can fail with ArrayIndexOutOfBounds, closes #1467.

This commit is contained in:
Shay Banon 2011-11-15 09:23:56 +02:00
parent dc2824fe06
commit 9bf42fed1b

View File

@ -79,6 +79,9 @@ public class NestedChildrenCollector extends FacetCollector {
}
@Override public void collect(int parentDoc) throws IOException {
if (parentDoc == 0) {
return;
}
int prevParentDoc = parentDocs.prevSetBit(parentDoc - 1);
for (int i = (parentDoc - 1); i > prevParentDoc; i--) {
if (!currentReader.isDeleted(i) && childDocs.get(i)) {