BooleanQuery out = new BooleanQuery();
for (int f = 0; f < FIELDS.length; f++) {
Clause o = c;
if (c.isPhrase()) { // optimize phrase clauses
String[] opt = new CommonGrams(getConf()).optimizePhrase(c.getPhrase(), FIELDS[f]);
if (opt.length==1) {
o = new Clause(new Term(opt[0]), c.isRequired(), c.isProhibited(), getConf());
} else {
o = new Clause(new Phrase(opt), c.isRequired(), c.isProhibited(), getConf());
}