lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [lucenenet] NightOwl888 commented on a change in pull request #438: Don't insert extra newline in TFIDFSim's score explanation
Date Fri, 12 Mar 2021 16:57:47 GMT

NightOwl888 commented on a change in pull request #438:
URL: https://github.com/apache/lucenenet/pull/438#discussion_r593318298



##########
File path: src/Lucene.Net/Search/Similarities/TFIDFSimilarity.cs
##########
@@ -751,7 +751,7 @@ public override void Normalize(float queryNorm, float topLevelBoost)
         private Explanation ExplainScore(int doc, Explanation freq, IDFStats stats, NumericDocValues
norms)
         {
             Explanation result = new Explanation();
-            result.Description = "score(doc=" + doc + ",freq=" + freq + "), product of:";
+            result.Description = "score(doc=" + doc + ",freq=" + freq.Value + "), product
of:";

Review comment:
       Please add the following comment just before this line:
   
   ```
   // LUCENENET specific - using freq.Value is a change that was made in Lucene 5.x, but is
included
   // in 4.8.0 to remove annoying newlines from the output.
   // See: https://github.com/apache/lucene-solr/commit/f0bfcbc7d8fbc5bb2791da60af559e8b0ad6eed6
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message