Apache Solr open-source search software
Wire VelocityResponseWriter into the example configuration
Erik Hatcher91e8bdca53aa
diff --git a/solr/example/solr/conf/solrconfig.xml b/solr/example/solr/conf/solrconfig.xmlindex 2616a49165f..4c8e1a51018 100755--- a/solr/example/solr/conf/solrconfig.xml+++ b/solr/example/solr/conf/solrconfig.xml@@ -55,6 +55,7 @@classpath, this is useful for including all jars in a directory.--><lib dir="../../contrib/extraction/lib" />+ <lib dir="../../contrib/velocity/src/main/solr/lib" /><!-- When a regex is specified in addition to a directory, only the files in thatdirectory which completely match the regex (anchored on both ends)will be included.@@ -1033,6 +1034,8 @@<queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>-->+ <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter"/>+<!-- XSLT response writer transforms the XML output by any xslt file foundin Solr's conf/xslt directory. Changes to xslt files are checked forevery xsltCacheLifetimeSeconds.diff --git a/solr/example/solr/conf/velocity/VM_global_library.vm b/solr/example/solr/conf/velocity/VM_global_library.vmnew file mode 100644index 00000000000..aff58380b3e--- /dev/null+++ b/solr/example/solr/conf/velocity/VM_global_library.vm@@ -0,0 +1,11 @@+#macro(nl2ul $named_list)+ <ul>+ #foreach($kv in $named_list)+ <li>$kv.key ($kv.value)+ #nl2ul($kv.value)+ </li>+ #end+ </ul>+#end++#macro(param $key)$request.params.get($key)#end