In this article:

Indexes

Fields

Settings

Setting Up Repository Search and Indexing

After installing all applications and setting up Solr configuration files, it is required to set up repository.

To do this, select the Tools > Parameters main menu item and go to the Search and Indexing tab: The tab contains three groups of parameters: Indexes, Fields and Settings. After all settings are specified, it is possible to index required sources.

Indexes

The Indexes tab is used to specify addresses of Solr instances, which will be used on search and indexing. To add a new instance, click the Add button, specify URL and select the language set up in the specified Solr instance.

Depending on the purpose, instances are specified in three subgroups:

Each value has its own search algorithm that is why the specified instances must have different addresses. Algorithms are determined by configuration files copied on setting up Solr instances.

NOTE. URL of the Solr instance is specified without # character, for example - http://localhost:8080/solr-4.4.0/SourceData_ru1.

Fields

The Fields tab is used to form a list of fields, which store indexed information.

System Fields

By default the list contains only system fields, their number is determined by structure of the configuration files, which were copied on Solr instance setup. The list of system fields is fixed, it must not be changed. Each system field enables the user to change only significance coefficient that affects search result relevance by this field.

Custom Fields

Custom fields ate used to index any additional information. To create a field, change configuration files of Solr schemas. In the <fields>...</fields> section, add a record similar to those that are already present in this section. Specify name, data type, field value and whether it is available to store several values, in attributes:

<field name="CustomField" type="name_searcher" indexed="true" stored="true" multiValued="false" required="false"/>

For details about configuration file structure of Solr schema see the Solr help system: https://wiki.apache.org/solr/SchemaXml.

NOTE. Changes must be done in the files of all added languages. After all changes are done, restart Apache Tomcat.

After this, open the menu in repository parameters next to the Add button and select the Load from Solr item. The list of all fields will be updated. Specify the following settings for custom fields:

Use the Assembly and Class drop-down lists to select Fore or Fore.NET assembly or class that implements the ISolrImportCustomValues interface. The method of this interface will be used to set custom field values. The method is generated for each indexed source. Example:

Class CSolrImportCustomValues: Object, ISolrImportCustomValues
    Sub FillValues(MbObject: IMetabaseObject; Values: ISolrFieldValues);
    Begin
        If MbObject.Id = "S_CUBE" Then
            Values.FindById("CustomField", SearchEngineTargetType.SourceData).Value := "Base data source";
        End If;
    End Sub FillValues;
End Class CSolrImportCustomValues;

Settings

The Settings tab is used to set various settings used in search.

See also:

Installing BI Search Service