for (final Weight w : weights) {
final NodeBooleanClause c = cIter.next();
if (w.scorer(context, true, true, context.reader().getLiveDocs()) == null) {
if (c.isRequired()) {
fail = true;
final Explanation r = new Explanation(0.0f, "no match on required " +
"clause (" + c.getQuery().toString() + ")");
sumExpl.addDetail(r);
}
continue;
}
final Explanation e = w.explain(context, doc);
if (e.isMatch()) {
if (!c.isProhibited()) {
sumExpl.addDetail(e);
sum += e.getValue();
coord++;
}
else {
final Explanation r =
new Explanation(0.0f, "match on prohibited clause (" +
c.getQuery().toString() + ")");
r.addDetail(e);
sumExpl.addDetail(r);
fail = true;
}
}
else if (c.isRequired()) {
final Explanation r = new Explanation(0.0f, "no match on required " +
"clause (" + c.getQuery().toString() + ")");
r.addDetail(e);
sumExpl.addDetail(r);
fail = true;
}
}
if (fail) {