Submitted by Danny Groenewegen on 5 March 2011 at 17:30

On 11 March 2011 at 16:51 Sander van der Burg commented:

Maybe you should also implement dynamic configuration of the index directory, for the following reasons:

  • Paths are not always portable. Usually on Unix-like systems /var/blabla will do fine, but not on platforms such as Windows. This is also not really the “Java way” of configuring applications
  • If you want to change this directory, a rebuild/reconfiguration of the web application is needed.
  • It requires you to manually create the index directory and give it proper permissions. This can become a maintenance burden in distributed configurations. For instance, it is not always clear under which user Apache Tomcat runs.

The best way to dynamically assign paths in by configuring Hibernate dynamically and store the indexes somewhere relative to the class files. The files are then stored in the webapps/ folder in Apache Tomcat with the right permissions.

Possible solution: http://stackoverflow.com/questions/4966297/dynamic-configuration-of-hibernate-search


On 21 March 2011 at 19:03 Elmer van Chastelet commented:

The index directory can now be set using the property ‘indexdir’ in application.ini. Default is /var/indexes.

I’ll keep the issue open for now, a dynamic path relative to the class files would be nicer as stated by Sander.


On 21 March 2012 at 17:25 Elmer van Chastelet tagged 1.3.0

On 21 March 2012 at 17:25 Elmer van Chastelet tagged search

On 21 March 2012 at 17:29 Elmer van Chastelet commented:

The default path set by the new project wizard of the plugin is ‘searchindex’. This is a relative path, which will result in a paths being different for the reindex script when used in a deployed tomcat dir, and when running the webdsl reindex commandline / reindex ant task.


On 29 March 2012 at 15:32 Elmer van Chastelet tagged searchindex

On 15 January 2013 at 14:25 Elmer van Chastelet removed tag 1.3.0

On 5 December 2013 at 14:46 Elmer van Chastelet tagged application.ini

Log in to post comments