private MultiTermQuery copyMultiTermQuery(MultiTermQuery query) {
if(query instanceof TermRangeQuery) {
TermRangeQuery q = (TermRangeQuery)query;
q.setBoost(query.getBoost());
return new TermRangeQuery(q.getField(), q.getLowerTerm(), q.getUpperTerm(), q.includesLower(), q.includesUpper());
} else if(query instanceof WildcardQuery) {
MultiTermQuery q = new WildcardQuery(query.getTerm());
q.setBoost(query.getBoost());
return q;
} else if(query instanceof PrefixQuery) {