// if(casQuery.getCriteria().isEmpty())
// casQuery.addCriterion(new FreeTextQueryCriteria());
// ((FreeTextQueryCriteria)casQuery.getCriteria().get(0)).addValue(t.text());
} else {
casQuery
.addCriterion(new TermQueryCriteria(t.field(), t.text()));
}
} else if (luceneQuery instanceof PhraseQuery) {
Term[] t = ((PhraseQuery) luceneQuery).getTerms();
if (t[0].field().equals(freeTextBlock)) {
// if(casQuery.getCriteria().isEmpty())
// casQuery.addCriterion(new FreeTextQueryCriteria());
// for(int i=0;i<t.length;i++)
// ((FreeTextQueryCriteria)casQuery.getCriteria().get(0)).addValue(t[i].text());
} else {
for (int i = 0; i < t.length; i++)
casQuery.addCriterion(new TermQueryCriteria(t[i].field(),
t[i].text()));
}
} else if (luceneQuery instanceof RangeQuery) {
Term startT = ((RangeQuery) luceneQuery).getLowerTerm();
Term endT = ((RangeQuery) luceneQuery).getUpperTerm();