Prepare for Deployment
From DBSight Full-Text Search Engine/Platform Wiki
|Table of contents|
Prepare DBSight for different environments
Switch DBSight Properties file
Change from system properties
Modify your application server's starting script:
java -Ddbsight.properties.file=WEB-INF/data/dbsight.properties .... //Or on windows java -Ddbsight.properties.file="c:\data\dbsight" ...
Change from WEB-INF/web.xml
In your WEB-INF/web.xml, find the following setting:
<init-param> <param-name>dbsight.properties.file</param-name> <param-value>WEB-INF/data/dbsight.properties</param-value> </init-param>
To some new value like this:
<init-param> <param-name>dbsight.properties.file</param-name> <param-value>C:\data\dbsight.properties</param-value> </init-param>
DBSight will try to pick up the dbsight properties file location from -Ddbsight.properties.file=... first, then from the web.xml file.
Change Index Data Directory
Very often, with your data growing, you want to move the large index files out of the default WEB-INF/data directory. You can do so by following one of the approaches.
Export Index Configuration before moving
If you already created some search, you should export them before moving the data directory.
Change from system properties
Modify your dbsight.properties file by one of the following:
This way, most of the files that change often will live outside of the war file. This would make it easy to deploy to application servers like Weblogic. All you need to do is to
- download and unzip the dbsight.war file
- modify the web.xml file
- re-package everything as a new war file
Then you can deploy the new war file to almost any application server.
And of course, you will need to create the data directory if it doesn't exist.
Note: Template Files still with the web app
The search results rendering template files, which you will create and probably modify, still lives together with the expanded war file.
So if you still want to modify the result templates, you will need to manually unzip the war file. After all your templates editing is done, you can create a war file yourself, and deploy to any application server.
Set JDBC connection properties
In dbsight.properties file, you can also specify jdbc connection url, username and password, for the whole DBSight instance or for a specificy index.
#jdbc.url=your_real_jdbc_connection_url #jdbc.username=your_real_username #jdbc.password=your_real_password # # If you have several indexes, you can have their own jdbc settings by prepending the index name # These will take precedence over the jdbc settings without the index name # #real_index_name.jdbc.url=your_real_index_jdbc_connection_url #real_index_name.jdbc.username=your_real_index_username #real_index_name.jdbc.password=your_real_index_password
This way, you don't need to tweak jdbc settings after uploading the DBSight index configuration file.
Be careful, because these jdbc values won't be visible to the administration UI. So it could work when you are testing the jdbc connections from the UI, but not when running the indexing process. This is one way of "security", but also one way of misleading.