public Explanation explain(int docNr) throws IOException { return scorer.explain(docNr); } }
public Explanation explain(int docNr) throws IOException { return scorer.explain(docNr); } }
public Explanation explain(IndexReader reader, int doc) throws IOException { return scorer(reader).explain(doc); } }
public Explanation explain(IndexReader reader, int doc) throws IOException { return scorer(reader).explain(doc); } }
public Explanation explain(IndexReader reader, int doc) throws IOException { return scorer(reader).explain(doc); } }
public Explanation explain(IndexReader reader, int doc) throws IOException { return scorer(reader).explain(doc); } }
/** Explain the score of a document. * @todo Also show the total score. * See BooleanScorer.explain() on how to do this. */ public Explanation explain(int doc) throws IOException { Explanation res = new Explanation(); res.setDescription("required, optional"); res.addDetail(reqScorer.explain(doc)); res.addDetail(optScorer.explain(doc)); return res; } }
/** Explain the score of a document. * @todo Also show the total score. * See BooleanScorer.explain() on how to do this. */ public Explanation explain(int doc) throws IOException { Explanation res = new Explanation(); res.setDescription("required, optional"); res.addDetail(reqScorer.explain(doc)); res.addDetail(optScorer.explain(doc)); return res; } }
@Override public Explanation explain(IndexReader reader, int doc) throws IOException { SolrIndexReader topReader = (SolrIndexReader)reader; SolrIndexReader[] subReaders = topReader.getLeafReaders(); int[] offsets = topReader.getLeafOffsets(); int readerPos = SolrIndexReader.readerIndex(doc, offsets); int readerBase = offsets[readerPos]; return scorer(subReaders[readerPos], true, true).explain(doc-readerBase); } }
/** @return An explanation for the score of a given document. */ public Explanation explain(int doc) throws IOException { Explanation res = new Explanation(); Iterator ssi = subScorers.iterator(); float sumScore = 0.0f; int nrMatches = 0; while (ssi.hasNext()) { Explanation es = ((Scorer) ssi.next()).explain(doc); if (es.getValue() > 0.0f) { // indicates match sumScore += es.getValue(); nrMatches++; } res.addDetail(es); } if (nrMatchers >= minimumNrMatchers) { res.setValue(sumScore); res.setDescription("sum over at least " + minimumNrMatchers + " of " + subScorers.size() + ":"); } else { res.setValue(0.0f); res.setDescription(nrMatches + " match(es) but at least " + minimumNrMatchers + " of " + subScorers.size() + " needed"); } return res; } }
/** @return An explanation for the score of a given document. */ public Explanation explain(int doc) throws IOException { Explanation res = new Explanation(); Iterator ssi = subScorers.iterator(); float sumScore = 0.0f; int nrMatches = 0; while (ssi.hasNext()) { Explanation es = ((Scorer) ssi.next()).explain(doc); if (es.getValue() > 0.0f) { // indicates match sumScore += es.getValue(); nrMatches++; } res.addDetail(es); } if (nrMatchers >= minimumNrMatchers) { res.setValue(sumScore); res.setDescription("sum over at least " + minimumNrMatchers + " of " + subScorers.size() + ":"); } else { res.setValue(0.0f); res.setDescription(nrMatches + " match(es) but at least " + minimumNrMatchers + " of " + subScorers.size() + " needed"); } return res; } }
public Explanation explain(int doc) throws IOException { Explanation res = new Explanation(); if (exclScorer.skipTo(doc) && (exclScorer.doc() == doc)) { res.setDescription("excluded"); } else { res.setDescription("not excluded"); res.addDetail(reqScorer.explain(doc)); } return res; } }
public Explanation explain(int doc) throws IOException { Explanation res = new Explanation(); if (exclScorer.skipTo(doc) && (exclScorer.doc() == doc)) { res.setDescription("excluded"); } else { res.setDescription("not excluded"); res.addDetail(reqScorer.explain(doc)); } return res; } }
public Explanation explain(int doc) throws IOException { Explanation subQueryExpl = weight.subQueryWeight.explain(reader,doc); if (!subQueryExpl.isMatch()) { return subQueryExpl; } // match Explanation[] valSrcExpls = new Explanation[valSrcScorers.length]; for(int i = 0; i < valSrcScorers.length; i++) { valSrcExpls[i] = valSrcScorers[i].explain(doc); } Explanation customExp = customExplain(doc,subQueryExpl,valSrcExpls); float sc = qWeight * customExp.getValue(); Explanation res = new ComplexExplanation( true, sc, CustomScoreQuery.this.toString() + ", product of:"); res.addDetail(customExp); res.addDetail(new Explanation(qWeight, "queryBoost")); // actually using the q boost as q weight (== weight value) return res; } }
public Explanation explain(int doc) throws IOException { Explanation subQueryExpl = weight.subQueryWeight.explain(reader,doc); if (!subQueryExpl.isMatch()) { return subQueryExpl; } // match Explanation[] valSrcExpls = new Explanation[valSrcScorers.length]; for(int i = 0; i < valSrcScorers.length; i++) { valSrcExpls[i] = valSrcScorers[i].explain(doc); } Explanation customExp = customExplain(doc,subQueryExpl,valSrcExpls); float sc = qWeight * customExp.getValue(); Explanation res = new ComplexExplanation( true, sc, CustomScoreQuery.this.toString() + ", product of:"); res.addDetail(customExp); res.addDetail(new Explanation(qWeight, "queryBoost")); // actually using the q boost as q weight (== weight value) return res; } }
"), product of:"); Explanation tfExpl = scorer(reader).explain(doc); fieldExpl.addDetail(tfExpl); fieldExpl.addDetail(idfExpl);
"), product of:"); Explanation tfExpl = scorer(reader).explain(doc); fieldExpl.addDetail(tfExpl); fieldExpl.addDetail(idfExpl);
"), product of:"); Explanation tfExpl = scorer(reader).explain(doc); fieldExpl.addDetail(tfExpl); fieldExpl.addDetail(idfExpl);
"), product of:"); Explanation tfExpl = scorer(reader).explain(doc); fieldExpl.addDetail(tfExpl); fieldExpl.addDetail(idfExpl);
"), product of:"); Explanation tfExpl = scorer(reader).explain(doc); fieldExpl.addDetail(tfExpl); fieldExpl.addDetail(idfExpl);