TFIDFSimilarity.explainScore currently outputs an annoying (but harmless of course) extra \n.
It occurs because the freq argument is included as is in the description of the
top Explain node,
whereas freq.getValue() is sufficient. The full freq Explain node is included
as a detail further on anyway...
I attached a patch generated with git, but it's just:
- result.setDescription("score(doc="+doc+",freq="+freq+"), product of:");
+ result.setDescription("score(doc="+doc+",freq="+freq.getValue()+"),
product of:");
Output like this:
<lst name="explain">
<str name="0-764629">
5.5484066 = (MATCH) max of:
5.5484066 = (MATCH) weight(titreSearch:camus in 4158) [DefaultSimilarity],
result of:
5.5484066 = score(doc=4158,freq=1.0 = termFreq=1.0
), product of:
0.60149205 = queryWeight, product of:
9.224405 = idf(docFreq=450, maxDocs=1682636)
0.065206595 = queryNorm
9.224405 = fieldWeight in 4158, product of:
1.0 = tf(freq=1.0), with freq of:
1.0 = termFreq=1.0
9.224405 = idf(docFreq=450, maxDocs=1682636)
1.0 = fieldNorm(doc=4158)
</str>
</lst>
becomes:
<lst name="explain">
<str name="0-764629">
5.5484066 = (MATCH) max of:
5.5484066 = (MATCH) weight(titreSearch:camus in 4158) [DefaultSimilarity],
result of:
5.5484066 = score(doc=4158,freq=1.0), product of:
0.60149205 = queryWeight, product of:
9.224405 = idf(docFreq=450, maxDocs=1682636)
0.065206595 = queryNorm
9.224405 = fieldWeight in 4158, product of:
1.0 = tf(freq=1.0), with freq of:
1.0 = termFreq=1.0
9.224405 = idf(docFreq=450, maxDocs=1682636)
1.0 = fieldNorm(doc=4158)
</str>
</lst>
0001-Cleanup-of-TFIDFSimilarity.explainScore.patch
Description: 0001-Cleanup-of-TFIDFSimilarity.explainScore.patch
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
