if (score) {
ParentQuery parentQuery = new ParentQuery(searchContext, innerQuery, parentType, childTypes, childFilter);
searchContext.addRewrite(parentQuery);
query = parentQuery;
} else {
<BUG>HasParentFilter hasParentFilter = HasParentFilter.create(executionType, innerQuery, parentType, searchContext);
searchContext.addRewrite(hasParentFilter);</BUG>
query = new ConstantScoreQuery(hasParentFilter);
}
query.setBoost(boost);

if (score) {
ParentQuery parentQuery = new ParentQuery(searchContext, innerQuery, parentType, childTypes, childFilter);
searchContext.addRewrite(parentQuery);
query = parentQuery;
} else {
HasParentFilter hasParentFilter = HasParentFilter.create(innerQuery, parentType, searchContext);
searchContext.addRewrite(hasParentFilter);
query = new ConstantScoreQuery(hasParentFilter);
}
query.setBoost(boost);
