private Filter buildNewFilter(Query query, ConcurrentMap<String, String> filterAlias, FilterParser filterParser)
throws ParseException {
if (query instanceof BooleanQuery) {
BooleanQuery booleanQuery = (BooleanQuery) query;
BooleanFilter booleanFilter = new BooleanFilter();
for (BooleanClause clause : booleanQuery.clauses()) {
booleanFilter.add(buildNewFilter(clause.getQuery(), filterAlias, filterParser), clause.getOccur());
}
return booleanFilter;
} else if (query instanceof TermQuery) {
TermQuery termQuery = (TermQuery) query;