Skip to content

Apache Lucene open-source search software

LUCENE-7360: Remove Explanation.toHtml()

Alan Woodwardf3dcd467ff39
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 14455ba44d2..22f86b2c404 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
diff --git a/lucene/MIGRATE.txt b/lucene/MIGRATE.txt
index d9cfefb2582..2c9bc9c39a7 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.
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 3e5951a5a0f..818f83f77e2 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();
- }
+
}