Hi there -
I'm helping out with the Lucene.Net port of 2.9, and when rooting around
in CustomScoreQuery.CustomWeight, I noticed what appears to be an
unnecessary call to doExplain in the explain method.
Current method in trunk:
public Explanation explain(IndexReader reader, int doc) throws
IOException {
Explanation explain = doExplain(reader, doc);
return explain == null ? new Explanation(0.0f, "no matching docs")
: doExplain(reader, doc);
}
Is there a reason it shouldn't be:
public Explanation explain(IndexReader reader, int doc) throws
IOException {
Explanation explain = doExplain(reader, doc);
return explain == null ? new Explanation(0.0f, "no matching docs")
: explain);
}
I might be overlooking something, but it appears to be two calls to
doExplain when only one would suffice.
Michael
Michael Garski
Sr. Search Architect
310.969.7435 (office)
310.251.6355 (mobile)
www.myspace.com/michaelgarski