Two different indexes with the same nested object name causing ArrayIndexOutOfBoundsException, closes #1575.

This commit is contained in:
Shay Banon 2011-12-28 22:20:09 +02:00
parent cb0284f802
commit bb63d38a65
2 changed files with 10 additions and 8 deletions

View File

@ -125,10 +125,11 @@ public class NestedFilterParser implements FilterParser {
Filter parentFilter = currentParentFilterContext;
if (parentFilter == null) {
parentFilter = NonNestedDocsFilter.INSTANCE;
if (mapper.hasDocMapper()) {
// filter based on the type...
parentFilter = mapper.docMapper().typeFilter();
}
// don't do special parent filtering, since we might have same nested mapping on two different types
//if (mapper.hasDocMapper()) {
// // filter based on the type...
// parentFilter = mapper.docMapper().typeFilter();
//}
parentFilter = parseContext.cacheFilter(parentFilter, null);
}

View File

@ -131,10 +131,11 @@ public class NestedQueryParser implements QueryParser {
Filter parentFilter = currentParentFilterContext;
if (parentFilter == null) {
parentFilter = NonNestedDocsFilter.INSTANCE;
if (mapper.hasDocMapper()) {
// filter based on the type...
parentFilter = mapper.docMapper().typeFilter();
}
// don't do special parent filtering, since we might have same nested mapping on two different types
//if (mapper.hasDocMapper()) {
// // filter based on the type...
// parentFilter = mapper.docMapper().typeFilter();
//}
parentFilter = parseContext.cacheFilter(parentFilter, null);
}