diff --git a/src/main/java/org/elasticsearch/index/query/NestedFilterParser.java b/src/main/java/org/elasticsearch/index/query/NestedFilterParser.java index 5aab30e927c..7da8860da52 100644 --- a/src/main/java/org/elasticsearch/index/query/NestedFilterParser.java +++ b/src/main/java/org/elasticsearch/index/query/NestedFilterParser.java @@ -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); } diff --git a/src/main/java/org/elasticsearch/index/query/NestedQueryParser.java b/src/main/java/org/elasticsearch/index/query/NestedQueryParser.java index b5d2d0c431b..da30dcd7bac 100644 --- a/src/main/java/org/elasticsearch/index/query/NestedQueryParser.java +++ b/src/main/java/org/elasticsearch/index/query/NestedQueryParser.java @@ -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); }