SpanQuery[] clauses = new SpanQuery[terms.length];
// phrase queries : keep the default function i.e. average
for (int i = 0; i < terms.length; i++)
clauses[i] = new PayloadTermQuery(terms[i], func);
output = new PayloadNearQuery(clauses, slop, inorder);
}
// recursively rewrite DJMQs
else if (input instanceof DisjunctionMaxQuery) {
DisjunctionMaxQuery s = ((DisjunctionMaxQuery) input);
DisjunctionMaxQuery t = new DisjunctionMaxQuery(tiebreaker);