ISourceDataImportContext.ContainerKeys

Fore Syntax

ContainerKeys: Array;

Fore.NET Syntax

ContainerKeys: Array;

Description

The ContainerKeys property determines array of repository objects for which it is necessary to index all child elements.

Comments

On determining the ContainerKeys property all child data sources will be indexed with default parameters:

NOTE. Indexing of parametric objects is not performed.

Fore Example

IMPORTANT. Because of the existing features of the Fore language implementation and use of multi-thread mode on indexing, indexing with code on the Fore language is not supported. Develop on the Fore.NET language.

Fore.NET Example

Executing the example requires that the repository contains folder with the F_CUBES identifier where cubes are stored and the F_TSDB folder where time series databases are stored.

Imports Prognoz.Platform.Interop.BISearch;
Imports Prognoz.Platform.Interop.Cubes;
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;
    Schema: ISolrSearchEngineSchema;
    ImportExecutor: IImportExecutor;
    ImportContext: ISourceDataImportContext;
    SolrContext: ISolrImportContext;
    Locales: Array = New Integer[1] = [LocaleCodeID.lcidRussian As Integer];
    Containers: Array = New Integer[2];
Begin
    MB := Params.Metabase;
    //Parameters of search and indexing set for repository
    SharedParams := MB.SpecialObject[MetabaseSpecialObject.msoSharedParams].Bind() As ISharedParams;
    SearchEngine := SharedParams.SearchEngine As ISolrSearchEngineService;
    Schema := SearchEngine.SearchEngineSchema As ISolrSearchEngineSchema;
    //Indexing parameters
    Schema.ImportProcessOptions.NeedSmartSearch := False;
    ImportExecutor := Schema.ImportExecutor[SearchEngineTargetType.settSourceData];
    ImportContext := ImportExecutor.CreateContext() As ISourceDataImportContext;
    SolrContext := ImportContext As ISolrImportContext;
    SolrContext.CleanType := SolrImportCleanType.sictSpecified;
    SolrContext.Locales := Locales;
    //Objects being indexed
    Containers[0] := MB.GetObjectKeyById("F_CUBES"As Integer;
    Containers[1] := MB.GetObjectKeyById("F_TSDB"As Integer;
    ImportContext.ContainerKeys := Containers;
    //Indexing
    ImportExecutor.Import(ImportContext);
End Sub;

On executing the example the context required for indexing of data source dimension elements will be created. The language used for indexing and two folders where all objects will be indexed will be determined in the settings. After determination of all settings the indexing will be executed.

See also:

ISourceDataImportContext