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.
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:
Data. Solr instances are specified that are used to index and search information about elements of the dimensions, which form data slices.
Metadata. Solr instances are specified that are used to store indexed metadata of sources or certain object classes.
Smart Search. Solr instances are specified that are configured to search by free source dimensions. Free dimension is a dimension, which is searched through, but found elements of this dimension will not be included to names in search results.
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.
The Fields tab is used to form a list of fields, which store indexed information.
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 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:
Field Type. Field type specifies how a field will be used on forming requests to Apache Solr. Available values:
Regular Field. The field is not used in search, it can be used in filtering and sorting expressions, which can be arranged at application level by means of the Fore language.
Search Field. The field is used in search.
Faceted Search Field. The field is used in faceted search (search with grouping of found objects by categories).
Significance Coefficient. The coefficient that affects search result relevance by this field.
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;
The Settings tab is used to set various settings used in search.
Logical Search Operator. The logical operator is specified, which is placed between the words on forming a request during search.
Relevance Influence Formula. The formula based on which significance of indexed field values is determined. The formula may contain created fields and various functions. The list of available functions is given in the Solr help system: https://wiki.apache.org/solr/FunctionQuery.
See also: