if (parentDocMapper == null) {
throw new QueryParsingException(parseContext.index(), "[parent] filter configured 'parent_type' [" + parentType + "] is not a valid type");
}
query = new XFilteredQuery(query, parseContext.cacheFilter(parentDocMapper.typeFilter(), null));
SearchContext searchContext = SearchContext.current();
<BUG>HasParentFilter parentFilter = HasParentFilter.create(executionType, query, parentType, searchContext);
searchContext.addRewrite(parentFilter);</BUG>
if (filterName != null) {
parseContext.addNamedFilter(filterName, parentFilter);
}

if (parentDocMapper == null) {
throw new QueryParsingException(parseContext.index(), "[parent] filter configured 'parent_type' [" + parentType + "] is not a valid type");
}
query = new XFilteredQuery(query, parseContext.cacheFilter(parentDocMapper.typeFilter(), null));
SearchContext searchContext = SearchContext.current();
HasParentFilter parentFilter = HasParentFilter.create(query, parentType, searchContext);
searchContext.addRewrite(parentFilter);
if (filterName != null) {
parseContext.addNamedFilter(filterName, parentFilter);
}
