You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2016/10/20 12:10:13 UTC

lucene-solr:branch_6x: LUCENE-7496: Better toString for SweetSpotSimilarity

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x c35c723bf -> 22b0d5f4d


LUCENE-7496: Better toString for SweetSpotSimilarity

(cherry picked from commit c4b4830)


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

Branch: refs/heads/branch_6x
Commit: 22b0d5f4d21acaa3a28da5dec0654ecf102198c3
Parents: c35c723
Author: Jan H�ydahl <ja...@apache.org>
Authored: Thu Oct 20 14:07:11 2016 +0200
Committer: Jan H�ydahl <ja...@apache.org>
Committed: Thu Oct 20 14:09:38 2016 +0200

----------------------------------------------------------------------
 lucene/CHANGES.txt                                  |  2 ++
 .../org/apache/lucene/misc/SweetSpotSimilarity.java | 16 ++++++++++++++++
 2 files changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/22b0d5f4/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index a36777b..a009b2b 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -61,6 +61,8 @@ Improvements
 * LUCENE-7439: FuzzyQuery now matches all terms within the specified
   edit distance, even if they are short terms (Mike McCandless)
 
+* LUCENE-7496: Better toString for SweetSpotSimilarity (janhoy)
+
 Optimizations
 
 * LUCENE-7501: BKDReader should not store the split dimension explicitly in the

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/22b0d5f4/lucene/misc/src/java/org/apache/lucene/misc/SweetSpotSimilarity.java
----------------------------------------------------------------------
diff --git a/lucene/misc/src/java/org/apache/lucene/misc/SweetSpotSimilarity.java b/lucene/misc/src/java/org/apache/lucene/misc/SweetSpotSimilarity.java
index ce26080..7eeeae0 100644
--- a/lucene/misc/src/java/org/apache/lucene/misc/SweetSpotSimilarity.java
+++ b/lucene/misc/src/java/org/apache/lucene/misc/SweetSpotSimilarity.java
@@ -223,4 +223,20 @@ public class SweetSpotSimilarity extends ClassicSimilarity {
     
   }
 
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("SweetSpotSimilarity")
+        .append("(")
+        .append("ln_min="+ln_min+", ")
+        .append("ln_max=").append(ln_max).append(", ")
+        .append("ln_steep=").append(ln_steep).append(", ")
+        .append("tf_base=").append(tf_base).append(", ")
+        .append("tf_min=").append(tf_min).append(", ")
+        .append("tf_hyper_min=").append(tf_hyper_min).append(", ")
+        .append("tf_hyper_max=").append(tf_hyper_max).append(", ")
+        .append("tf_hyper_base=").append(tf_hyper_base).append(", ")
+        .append("tf_hyper_xoffset=").append(tf_hyper_xoffset)
+        .append(")");
+    return sb.toString();
+  }
 }