make the search index directory configurable in application.ini
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.
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.
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.
Log in to post comments