// Now create CandidateResourceQueries that associate the surface form to each context term
BooleanQuery orQuery = new BooleanQuery();
for (Term sfTerm: sfTerms) { //FIXME this is not correct in the context of the ICF similarity. better to pass the full set downstream and let they handle it there. but for now, we have only one term..
for (Term t: ctxTerms) {
orQuery.add(new CandidateResourceQuery(sfTerm, t), BooleanClause.Occur.SHOULD);
}
}
// Apply fuzzy surface forms filter to the orQuery
FilteredQuery filteredQuery = new FilteredQuery(orQuery, new CachingWrapperFilter(new QueryWrapperFilter(sfQuery)));
return filteredQuery;