lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romseyg...@apache.org
Subject lucene-solr:master: LUCENE-8012: LTR contrib needs to use float values in explanations
Date Tue, 02 Jan 2018 13:57:02 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master caa731a33 -> a56cb42fd


LUCENE-8012: LTR contrib needs to use float values in explanations


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/a56cb42f
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/a56cb42f
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/a56cb42f

Branch: refs/heads/master
Commit: a56cb42fde41422c99108ff2749c29080bb94e36
Parents: caa731a
Author: Alan Woodward <romseygeek@apache.org>
Authored: Tue Jan 2 13:56:42 2018 +0000
Committer: Alan Woodward <romseygeek@apache.org>
Committed: Tue Jan 2 13:56:52 2018 +0000

----------------------------------------------------------------------
 .../ltr/src/java/org/apache/solr/ltr/model/LinearModel.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a56cb42f/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/LinearModel.java
----------------------------------------------------------------------
diff --git a/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/LinearModel.java b/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/LinearModel.java
index 08780ca..5080edf 100644
--- a/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/LinearModel.java
+++ b/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/LinearModel.java
@@ -129,7 +129,7 @@ public class LinearModel extends LTRScoringModel {
           "weight on feature"));
       featureDetails.add(featureExplain);
 
-      details.add(Explanation.match(featureExplain.getValue().doubleValue()
+      details.add(Explanation.match(featureExplain.getValue().floatValue()
           * featureToWeight[index], "prod of:", featureDetails));
       index++;
     }


Mime
View raw message