Hi Olson,

You are correct v.base_dir parameter is not used at all after SOLR-4882. 
"{corename}/conf/velocity" is the only option. 
solr.allow.unsafe.resourceloading system property does not affect this behavior.

Wiki needs update. (confluence does not mention v.base_dir parameter) Do you 
want to add your findings to velocity wiki page?

P.S. If you don't have a wiki account anyone can create it. But to edit the 
wiki, your username should be added wiki contributors group. This is achieved 
by sending an e-mail to solr user mailing list.



On Wednesday, December 11, 2013 10:49 PM, O. Olson <olson_...@yahoo.it> wrote:
Thank you iorixxx. Yes, when I run: 

> java -Dsolr.allow.unsafe.resourceloading=true -jar start.jar

And I then load the root of my site, I get: 

ERROR - 2013-12-11 14:36:03.434; org.apache.solr.common.SolrException;
null:java.io.IOException: Unable to find resource 'browse.vm'
    at
org.apache.solr.response.VelocityResponseWriter.getTemplate(VelocityResponseWriter.java:174)
    at
org.apache.solr.response.VelocityResponseWriter.write(VelocityResponseWriter.java:50)

<stacktrace truncated>


In the above case, in the solrconfig.xml I have set: 

<str name="v.base_dir">MyVMTemplates</str> 

And my velocity templates are in /corename/conf/MyVMTemplates . If you look
at the VelocityResponseWriter at
http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_6/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java?revision=1541081&view=markup
 
nowhere does it use v.base_dir. So it seems that you need to name the
velocity template directory as "velocity". (I tried to set it to
"/corename/conf/velocity" and it works without any errors.) 

Thank you,
O. O.




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Change-Velocity-Template-Directory-in-Solr-4-6-tp4105381p4106232.html

Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to