ContainerKeys: Array;
ContainerKeys: Array;
The ContainerKeys property determines an array of repository objects, for which all child elements must be indexed.
On determining the ContainerKeys property all child data sources will be indexed with default parameters:
The default displaying option of the source is used.
In the dimensions list does not contain free dimensions except for calendar one.
Maximum selection of elements is determined for dimensions.
NOTE. Parametric objects are not indexed.
IMPORTANT. Because of the existing features of the Fore language implementation and use of multi-thread indexing mode, indexing with code in the Fore language is not supported. Develop in the Fore.NET language.
Executing the example requires that the repository contains a 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;
//Search and indexing parameters specified 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;
//Indexed objects
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 all settings are determined, indexing will be executed.
See also: