use of org.alfresco.solr.ContextAwareQuery in project SearchServices by Alfresco.
the class PostFilterQuery method getPostFilters.
private void getPostFilters(Query q, List<PostFilter> postFilters) {
if (q instanceof BooleanQuery) {
BooleanQuery bq = (BooleanQuery) q;
List<BooleanClause> clauses = bq.clauses();
for (BooleanClause clause : clauses) {
Query q1 = clause.getQuery();
getPostFilters(q1, postFilters);
}
} else if (q instanceof ContextAwareQuery) {
ContextAwareQuery cq = (ContextAwareQuery) q;
getPostFilters(cq.getLuceneQuery(), postFilters);
} else if (q instanceof PostFilter) {
postFilters.add((PostFilter) q);
} else if (q instanceof BoostQuery) {
BoostQuery bq = (BoostQuery) q;
getPostFilters(bq.getQuery(), postFilters);
}
}
Aggregations