Skip to content

Apache Lucene open-source search software

SOLR-14065: Deprecate Velocity

Ishan Chattopadhyaya57e717eff2df
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 0e896541958..cf93c7ab32a 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -174,6 +174,8 @@ Upgrade Notes
* SOLR-14071: Untrusted configsets (ones that are uploaded via unsecured configset API) cannot use <lib> directive.
Consider enabling authentication/authorization so that the uploaded configsets are trusted.
+* SOLR-14065: VelocityResponseWriter has been deprecated and may be removed in a future version.
+
New Features
---------------------
* SOLR-13821: A Package store to store and load package artifacts (noble, Ishan Chattopadhyaya)
diff --git a/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java b/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java
index 8594d500768..a598ba291e8 100644
--- a/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java
+++ b/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java
@@ -96,6 +96,7 @@ public class VelocityResponseWriter implements QueryResponseWriter, SolrCoreAwar
@Override
public void init(NamedList args) {
+ log.warn("VelocityResponseWriter is deprecated. This may be removed in future Solr releases. Please SOLR-14065.");
fileResourceLoaderBaseDir = null;
String templateBaseDir = (String) args.get(TEMPLATE_BASE_DIR);
diff --git a/solr/solr-ref-guide/src/velocity-response-writer.adoc b/solr/solr-ref-guide/src/velocity-response-writer.adoc
index ef951964752..50b9ec58470 100644
--- a/solr/solr-ref-guide/src/velocity-response-writer.adoc
+++ b/solr/solr-ref-guide/src/velocity-response-writer.adoc
@@ -18,6 +18,11 @@
The VelocityResponseWriter is an optional plugin available in the `contrib/velocity` directory. It powers the /browse user interfaces when using some example configurations such as "techproducts" and "example/files".
+[IMPORTANT]
+====
+The VelocityResponseWriter has been deprecated and may be removed in a future version of Solr.
+====
+
Its JAR and dependencies must be added (via `<lib>` or solr/home lib inclusion), and must be registered in `solrconfig.xml` like this:
[source,xml]