ISharedParams.SearchEngine

Fore Syntax

SearchEngine: ISearchEngineServiceBase

Fore.NET Syntax

SearchEngine: Prognoz.Platform.Interop.Metabase.ISearchEngineServiceBase

Description

The SearchEngine property determines parameters of the repository search platform.

Comments

The property is used to set up a search platform used on BI search service working. After getting parameters and adding required modifications, the SearchEngine property value should be re-assigned.

Fore Example

Connect the BiSearch, Fore, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    SharedParams: ISharedParams;
    SearchEngine: ISolrSearchEngineService;
    Cores: ISolrSearchEngineCores;
Begin
    MB := MetabaseClass.Active;
    //Get search and index parameters
    SharedParams := MB.SpecialObject(MetabaseSpecialObject.SharedParams).Edit As ISharedParams;
    SearchEngine := SharedParams.SearchEngine As ISolrSearchEngineService;
    Cores := SearchEngine.Cores;
    //Add the Sorl instance
    Cores.Add("http://localhost:8080/solr-4.4.0/SourceData_ru", SearchEngineTargetType.SourceData, LocaleCodeID.Russian);
    //Save
    SharedParams.SearchEngine := SearchEngine;
    (SharedParams As IMetabaseObject).Save;
End Sub UserProc;

On executing the example a new Solr instance will be added to the search settings which is used to index and search information about elements of dimensions which form data slices in Russian.

Fore.NET Example

The requirements and result of the Fore.NET Example execution match with those in the Fore Example. Except assemblies determined in the Fore Example, connect also the ForeSystem assembly.

Imports Prognoz.Platform.Interop.BISearch;
Imports Prognoz.Platform.Interop.ForeSystem;
Imports Prognoz.Platform.Interop.KeFore;
Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    SharedParams: ISharedParams;
    SearchEngine: ISolrSearchEngineService;
    Cores: ISolrSearchEngineCores;
Begin
    MB := Params.Metabase;
    //Get search and index parameters
    SharedParams := MB.SpecialObject[MetabaseSpecialObject.msoSharedParams].Edit() As ISharedParams;
    SearchEngine := SharedParams.SearchEngine As ISolrSearchEngineService;
    Cores := SearchEngine.Cores;
    //Add the Sorl instance
    Cores.Add("http://localhost:8080/solr-4.4.0/SourceData_ru", SearchEngineTargetType.settSourceData, LocaleCodeID.lcidRussian);
    //Save
    SharedParams.SearchEngine := SearchEngine;
    (SharedParams As IMetabaseObject).Save();
End Sub;

See also:

ISharedParams