Setting Up Solr Instances

To set up Solr instances, which will be used in search, execute the following operations:

  1. In the solr-4.4.0\solr\app folder, create a directory and name it, for example, BISearch_SourceData.

  2. In the BISearch_SourceData folder, create the Conf and indexData subfolders.

  3. Copy the solr_conf.zip archive (archive content description is given below), unpack its content to the BISearch_SourceData\Conf folder.

  1. Change contents of the sourceData_solrconfig.xml file: in the <lib dir=... strings it is necessary to correct the path by specifying where Solr files are unpacked, for example, <lib dir="c:\solr-4.4.0\dist"... .

  1. Create the solr.xml file in the solr-4.4.0\solr\app folder with the following contents:

<?xml version="1.0" encoding="UTF-8" ?>
<solr persistent="true" sharedLib="lib">

<cores host="${host:}" adminPath="/admin/cores" zkClientTimeout="${zkClientTimeout:150000}" hostPort="8080" hostContext="solr-4.4.0">

<core schema="sourceDataSchema_ru.xml" instanceDir="BISearch_SourceData\" name="SourceData_ru1" config="sourceData_solrconfig.xml" dataDir="indexData/SourceData_ru1"/>

<core schema="sourceDataSchema_ru.xml" instanceDir="BISearch_SourceData\" name="SourceData_ru2" config="sourceData_solrconfig.xml" dataDir="indexData/SourceData_ru2"/>

<core schema="sourceDataSchema_en.xml" instanceDir="BISearch_SourceData\" name="SourceData_en1" config="sourceData_solrconfig.xml" dataDir="indexData/SourceData_en1"/>

<core schema="sourceDataSchema_en.xml" instanceDir="BISearch_SourceData\" name="SourceData_en2" config="sourceData_solrconfig.xml" dataDir="indexData/SourceData_en2"/>

<core schema="mbObjectsSchema_ru.xml" instanceDir="BISearch_SourceData\" name="mbObjects_ru1" config="mbObjects_solrconfig.xml" dataDir="indexData/mbObjects_ru1"/>

<core schema="mbObjectsSchema_ru.xml" instanceDir="BISearch_SourceData\" name="mbObjects_ru2" config="mbObjects_solrconfig.xml" dataDir="indexData/mbObjects_ru2"/>

<core schema="mbObjectsSchema_en.xml" instanceDir="BISearch_SourceData\" name="mbObjects_en1" config="mbObjects_solrconfig.xml" dataDir="indexData/mbObjects_en1"/>

<core schema="mbObjectsSchema_en.xml" instanceDir="BISearch_SourceData\" name="mbObjects_en2" config="mbObjects_solrconfig.xml" dataDir="indexData/mbObjects_en2"/>

<core schema="freeDimsensionsSchema_ru.xml" instanceDir="BISearch_SourceData\" name="freeDimsensions_ru1" config="freeDimsensions_solrconfig.xml" dataDir="indexData/freeDimsensions_ru1"/>

<core schema="freeDimsensionsSchema_ru.xml" instanceDir="BISearch_SourceData\" name="freeDimsensions_ru2" config="freeDimsensions_solrconfig.xml" dataDir="indexData/freeDimsensions_ru2"/>

<core schema="freeDimsensionsSchema_en.xml" instanceDir="BISearch_SourceData\" name="freeDimsensions_en1" config="freeDimsensions_solrconfig.xml" dataDir="indexData/freeDimsensions_en1"/>

<core schema="freeDimsensionsSchema_en.xml" instanceDir="BISearch_SourceData\" name="freeDimsensions_en2" config="freeDimsensions_solrconfig.xml" dataDir="indexData/freeDimsensions_en2"/>

</cores>

</solr>

Each <core...> string contains settings of a single Solr instance. If required, several Solr instances can be created for one language. It is relevant if it is assumed to work with the repository, in which a large number of sources will be indexed. The optimal number of Solr instances for each language equals to the number of processor kernels (physical and virtual), because indexation or BI search of each instance is executed via single stream. The list of attributes, which are required to correct depending on the set parameters of Tomcat and Solr:

  1. Restart Tomcat. If all settings are correct, the following page should open for the considered example on following the URL http://localhost:8080/solr-4.4.0:

To further use Solr for BI server, start the corresponding service and index sources.

The solr_conf.zip archive content

See also:

Installing and Setting Up Software