BitDocIdSetFilter parentFilter = parseContext.bitsetFilter(parentDocMapper.typeFilter());
ParentChildIndexFieldData parentChildIndexFieldData = parseContext.getForField(parentFieldMapper);
Query childrenQuery;
if (minChildren > 1 || maxChildren > 0) {
childrenQuery = new ChildrenQuery(parentChildIndexFieldData, parentType, childType, parentFilter,query,ScoreType.NONE,minChildren, maxChildren, shortCircuitParentDocSet, nonNestedDocsFilter);
} else {
childrenQuery = new ChildrenConstantScoreQuery(parentChildIndexFieldData, query, parentType, childType, parentFilter,
shortCircuitParentDocSet, nonNestedDocsFilter);
}
if (filterName != null) {