return subQueryExpl;
}
if (scoreMode == ScoreMode.First) {
for (FilterFunction filterFunction : filterFunctions) {
DocSet docSet = DocSets.convert(reader, filterFunction.filter.getDocIdSet(reader));
if (docSet.get(doc)) {
filterFunction.function.setNextReader(reader);
Explanation functionExplanation = filterFunction.function.explain(doc, subQueryExpl);
float sc = getValue() * functionExplanation.getValue();
Explanation res = new ComplexExplanation(true, sc, "custom score, product of:");
res.addDetail(new Explanation(1.0f, "match filter: " + filterFunction.filter.toString()));
res.addDetail(functionExplanation);
res.addDetail(new Explanation(getValue(), "queryBoost"));
return res;
}
}
} else {
int count = 0;
float total = 0;
float max = Float.NEGATIVE_INFINITY;
ArrayList<Explanation> filtersExplanations = new ArrayList<Explanation>();
for (FilterFunction filterFunction : filterFunctions) {
DocSet docSet = DocSets.convert(reader, filterFunction.filter.getDocIdSet(reader));
if (docSet.get(doc)) {
filterFunction.function.setNextReader(reader);
Explanation functionExplanation = filterFunction.function.explain(doc, subQueryExpl);
float sc = functionExplanation.getValue();
count++;
total += sc;