Filter parentFilter = parseContext.cacheFilter(parentDocMapper.typeFilter(), null);
ChildrenQuery childrenQuery = new ChildrenQuery(searchContext, parentType, childType, parentFilter, innerQuery, scoreType);
searchContext.addRewrite(childrenQuery);
query = childrenQuery;
} else {
<BUG>HasChildFilter hasChildFilter = HasChildFilter.create(innerQuery, parentType, childType, searchContext, executionType);
searchContext.addRewrite(hasChildFilter);</BUG>
query = new ConstantScoreQuery(hasChildFilter);
}
query.setBoost(boost);

Filter parentFilter = parseContext.cacheFilter(parentDocMapper.typeFilter(), null);
ChildrenQuery childrenQuery = new ChildrenQuery(searchContext, parentType, childType, parentFilter, innerQuery, scoreType);
searchContext.addRewrite(childrenQuery);
query = childrenQuery;
} else {
HasChildFilter hasChildFilter = HasChildFilter.create(innerQuery, parentType, childType, searchContext);
searchContext.addRewrite(hasChildFilter);
query = new ConstantScoreQuery(hasChildFilter);
}
query.setBoost(boost);
