Ejemplo n.º 1
0
                public override Explanation Explain(int doc)
                {
                    ComplexExplanation result         = new ComplexExplanation();
                    Explanation        nonPayloadExpl = base.Explain(doc);

                    result.AddDetail(nonPayloadExpl);
                    // QUESTION: Is there a way to avoid this skipTo call? We need to know
                    // whether to load the payload or not
                    Explanation payloadBoost = new Explanation();

                    result.AddDetail(payloadBoost);

                    float payloadScore = GetPayloadScore();

                    payloadBoost.SetValue(payloadScore);
                    // GSI: I suppose we could toString the payload, but I don't think that
                    // would be a good idea
                    payloadBoost.SetDescription("scorePayload(...)");
                    result.SetValue(nonPayloadExpl.GetValue() * payloadScore);
                    result.SetDescription("btq, product of:");
                    result.SetMatch(nonPayloadExpl.GetValue() == 0?false:true);                     // LUCENE-1303
                    return(result);
                }
Ejemplo n.º 2
0
				public override Explanation Explain(int doc)
				{
					ComplexExplanation result = new ComplexExplanation();
					Explanation nonPayloadExpl = base.Explain(doc);
					result.AddDetail(nonPayloadExpl);
					// QUESTION: Is there a way to avoid this skipTo call? We need to know
					// whether to load the payload or not
					Explanation payloadBoost = new Explanation();
					result.AddDetail(payloadBoost);
					
					float payloadScore = GetPayloadScore();
					payloadBoost.SetValue(payloadScore);
					// GSI: I suppose we could toString the payload, but I don't think that
					// would be a good idea
					payloadBoost.SetDescription("scorePayload(...)");
					result.SetValue(nonPayloadExpl.GetValue() * payloadScore);
					result.SetDescription("btq, product of:");
					result.SetMatch(nonPayloadExpl.GetValue() == 0?false:true); // LUCENE-1303
					return result;
				}