You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2016/06/29 08:32:07 UTC

[3/3] lucene-solr:master: LUCENE-7360: Remove Explanation.toHtml()

LUCENE-7360: Remove Explanation.toHtml()


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

Branch: refs/heads/master
Commit: f3dcd467ff391ae7988cbc0576cc2c1bdb5caaa5
Parents: 23119db
Author: Alan Woodward <ro...@apache.org>
Authored: Wed Jun 29 09:16:13 2016 +0100
Committer: Alan Woodward <ro...@apache.org>
Committed: Wed Jun 29 09:16:13 2016 +0100

----------------------------------------------------------------------
 lucene/CHANGES.txt                              |  2 ++
 lucene/MIGRATE.txt                              |  4 ++++
 .../org/apache/lucene/search/Explanation.java   | 23 +-------------------
 3 files changed, 7 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f3dcd467/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 14455ba..22f86b2 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -15,6 +15,8 @@ Other
 
 * LUCENE-6968: LSH Filter (Tommaso Teofili, Andy Hind, Cao Manh Dat)
 
+* LUCENE-7360: Remove Explanation.toHtml() (Alan Woodward)
+
 ======================= Lucene 6.2.0 =======================
 
 New Features

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f3dcd467/lucene/MIGRATE.txt
----------------------------------------------------------------------
diff --git a/lucene/MIGRATE.txt b/lucene/MIGRATE.txt
index d9cfefb..2c9bc9c 100644
--- a/lucene/MIGRATE.txt
+++ b/lucene/MIGRATE.txt
@@ -14,3 +14,7 @@ yielding better compression ratios. In case you would still like to compress on
 top of the codec, you can do it on the application side by using the utility
 classes from the java.util.zip package.
 
+## Explanation.toHtml() removed (LUCENE-7360)
+
+Clients wishing to render Explanations as HTML should implement their own
+utilities for this.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f3dcd467/lucene/core/src/java/org/apache/lucene/search/Explanation.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/Explanation.java b/lucene/core/src/java/org/apache/lucene/search/Explanation.java
index 3e5951a..818f83f 100644
--- a/lucene/core/src/java/org/apache/lucene/search/Explanation.java
+++ b/lucene/core/src/java/org/apache/lucene/search/Explanation.java
@@ -120,26 +120,5 @@ public final class Explanation {
 
     return buffer.toString();
   }
-
-
-  /** Render an explanation as HTML. */
-  @Deprecated
-  public String toHtml() {
-    StringBuilder buffer = new StringBuilder();
-    buffer.append("<ul>\n");
-
-    buffer.append("<li>");
-    buffer.append(getSummary());
-    buffer.append("<br />\n");
-
-    Explanation[] details = getDetails();
-    for (int i = 0 ; i < details.length; i++) {
-      buffer.append(details[i].toHtml());
-    }
-
-    buffer.append("</li>\n");
-    buffer.append("</ul>\n");
-
-    return buffer.toString();
-  }
+  
 }