Database storage configuration
This page explains how to configure JSpider with MKSearch to use MySQL or PostgreSQL to store index triple statements. It also explains how to configure the servlet context to query the database store.
The configuration parameter names for database storage are common to JSpider indexing and servlet configuration, as follows.
-
dbVendor
-
Accepted values:
mysql
orpgsql
for MySQL or PostgreSQL respectively. -
dbName
- The name of the database that will be used to store the indexed triple statements and submit queries.
-
dbUser
- A database user name that corresponds with the named database.
-
dbPass
- The database password that corresponds with the relevant user name.
-
dbName
- The name of the database that will be used to store the indexed triple statements and submit queries.
JDBC drivers for MySQL and PostgreSQL
The JDBC driver for the relevant database must be available to the Java Virtual Machine at runtime. The drivers for MySQL and PostgreSQL are included in the MKSearch $mk_home/lib-opt
directory:
- mysql-connector-java-3.1.11-bin.jar
- postgresql-8.0-311.jdbc3.jar
JSpider classpath setting
To use database storage for JSpider indexing, add the database driver to the relevant script in the $mk_home/bin
directory, e.g. java-jspider.sh
below:
java -cp $mk_home/lib-opt/mysql-connector-java-3.1.11-bin.jar:$mk_home/lib/jspider.jar:$mk_home/lib/gnu-jaxp.jar:$mk_home/lib/sesame.jar:$mk_home/lib/jtidy.jar:$mk_home/dist/mksearch.jar:$mk_home/lib-opt/commons-logging.jar -Djspider.home=$mk_home net.javacoding.jspider.JSpider $1 $2
Copyright MKDoc Ltd. and others.
The Free Documentation License http://www.gnu.org/copyleft/fdl.html