title: Set dynamic index directory for Hibernate Search in Spring
body: <p>This has been discussed already, however none of the solutions/advices worked for me. I want to configure the lucene search index path in Spring via persistence.xml. This is important, since the deployment server is (of course) different from my local machine, so paths will not match. Right now, my configuration of hibernate-search inside the  persistence.xml looks like this:</p>
  
  <pre><code>&lt;property name="hibernate.search.default.directory_provider" value="filesystem" /&gt; 
  &lt;property name="tempdir" value="#{ systemProperties['java.io.tmpdir'] }" /&gt;
  &lt;property name="hibernate.search.default.indexBase" value="${tempdir}\hibernate\index" /&gt; 
  </code></pre>
  
  <p>I've seen this...</p>
  
  <p><a href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/expressions.html#expressions-beandef-xml-based" rel="nofollow">http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/expressions.html#expressions-beandef-xml-based</a></p>
  
  <p>...so it should work?! However, the variable is not replaced, and the files are written to a newly created subdir having the name ${tempdir}, which is not what I wanted :)</p>
  
  <p>Thanks for your help!</p>