Apache Solr Search Server

iKnowBase comes with ready-to-use components for integration with the Apache Solr open source enterprise search platform ( http://lucene.apache.org/solr/).

Installation

To install, do the following:

	solr-<version>
	solr-<version>/server
	lib\ext		- jdbc related files
	iknowbase	- core definition files
	iknowbase\lib	- iKnowBase security plugin
	iknowbase\conf	- Core configuration
$ cd solr-<version>
$ bin/solr create_core -c iknowbase -d server/solr/configsets/sample_techproducts_configs/conf/
$ cd solr-<version>/server/solr/iknowbase
$ cd solr-<version>/server/solr/iknowbase/conf
$ cp ../../../iknowbase/conf/* .
	jdbcUrl=jdbc:oracle:thin:@//<hostname>:<port>/<sid>
	dbUsername=<username>
	dbPassword=<password>

*g) edit the file solr-<version>/server/solr/iknowbase/conf/solrconfig.xml. Change the entry values to identify your db-connection and iKnowBase schema owner.

$ vi solr-<version>/server/solr/iknowbase/conf/solrcore.properties

Change solr-version to the correct value :

<luceneMatchVersion>*solr-version*</luceneMatchVersion>

If you are unsure of the valid value, verify the value given in solr-<version>/server/solr/configsets/basic_configs/conf/solrconfig.xml

*h) Start solr and make a verification

$ cd solr-<version>
$ bin/solr start

Verify it starts without any errors and access <hostname>:8389 from a browser. Make sure the core iKnowBase is available.

Upgrade an existing SOLR instance

To upgrade an existing installation, please follow the steps as descriped below:

$ cd solr-<version>/server/solr/iknowbase
$ cp <former solr release>/solr/<core>/core.properties core.properties
$ cd solr-<version>/server/solr/iknowbase/conf
$ cp <former solr release>/solr/<core>/conf/solrconfig.xml .
$ cp <former solr release>/solr/<core>/conf/schema.xml .
$ cp <former solr release>/solr/<core>/conf/solrcore.properties .
$ cp <former solr release>/solr/<core>/conf/<additional files customized in the former solr release> .
$ vi solr-<version>/server/solr/iknowbase/conf/solrcore.properties

Change solr-version to the correct value :

<luceneMatchVersion>*solr-version*</luceneMatchVersion>

If you are unsure of the valid value, verify the value given in solr-<version>/server/solr/configsets/basic_configs/conf/solrconfig.xml

cd solr-<version>
bin/solr start

Verify it starts without any errors and access :8389 from a browser. Make sure the core iKnowBase is available.

Starting and stopping

Create a start/stop script for linux. It can be placed under /etc/init.d. To add Solr as a linux service, use the chkconfig tool.

Start Solr and use a web browser to see the Admin Console: http://hostname.example.com:8983/solr/admin. If Solr is not running, your browser will complain that it cannot connect to the server.

Configuration

Before use, the Solr-installation must be configured. Similarly, the iKnowBase applications that will index and search must be configured.

Security-plugin

iKnowBase ships with a Solr-plugin that verifies document access for all documents returned from the Solr search engine. The principles behind this plugin is that iKnowBase will add security information to the search query sent to Solr, which will then be intercepted by the Solr engine during search. For this to work, two items must be in place. First, the plugin must be able to connect to the iKnowBase database, and second, the iKnowBase viewer application and the Solr plugin must share a common secret used to encrypt the security information.

The common secret is handled by a secure token engine, which is itself configured in two steps. First, the secure key is stored in the installation_properties table in the database, using a property name of com.iknowbase.secureTokenEngine.secureKey and an instance_qualifier that can be used by the iKnowBase web application (a single star, “*”, will always work); then the Solr plugin must be informed about this qualifier, so that it can load the same value.

Configure the security component by filling in proper values for the following properties in solrcore.properties:

Property name Description
jdbcUrl This points to the database where iKnowBase is installed, eg. jdbc:oracle:thin:@//hostname.example.com:portnumber/service_name.
dbUsername The database-user where iKnowBase is installed.
dbPassword The password to the iKnowBase database user.
instanceQualifier The instance_qualifier used to look up the proper secure token engine configuration from installation_properties in the iKnowBase database.

SolrCloud

Apache Solr includes the ability to set up a cluster of Solr servers that combines fault tolerance and high availability. Called SolrCloud, these capabilities provide distributed indexing and search capabilities, supporting the following features:

SolrCloud is the preferred method when it comes to load balancing, fail-over and replication.

We refer to documentation from Apache Solr e.g https://cwiki.apache.org/confluence/display/solr/SolrCloud for more information on this.

Configure the iKnowBase applications