Exemplo n.º 1
0
            public Explanation Explain(int doc)
            {
                var subQueryExpl = weight.qWeight.Explain(readerContext, doc);

                if (!subQueryExpl.IsMatch)
                {
                    return(subQueryExpl);
                }
                float       sc  = subQueryExpl.Value * vals.SingleVal(doc);
                Explanation res = new ComplexExplanation(true, sc, outerInstance.ToString() + ", product of:");

                res.AddDetail(subQueryExpl);
                res.AddDetail(vals.Explain(doc));
                return(res);
            }
Exemplo n.º 2
0
            public override Explanation Explain(AtomicReaderContext readerContext, int doc)
            {
                Explanation subQueryExpl = qWeight.Explain(readerContext, doc);

                if (!subQueryExpl.IsMatch)
                {
                    return(subQueryExpl);
                }
                FunctionValues vals = outerInstance.boostVal.GetValues(fcontext, readerContext);
                float          sc   = subQueryExpl.Value * vals.SingleVal(doc);
                Explanation    res  = new ComplexExplanation(true, sc, outerInstance.ToString() + ", product of:");

                res.AddDetail(subQueryExpl);
                res.AddDetail(vals.Explain(doc));
                return(res);
            }