IMbObjectsImportContext.ClassIds

Fore.NET Syntax

ClassIds: Array;

Description

The ClassIds property determines array containing class identifiers of indexed repository objects.

Comments

As property value it is necessary to determine integer-value array. Each array element contains one of available values of the MetabaseObjectClass enumeration.

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 contain settings to index and to search in Russian.

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;
    Schema: ISolrSearchEngineSchema;
    ImportExecutor: IImportExecutor;
    ImportContext: IMbObjectsImportContext;
    SolrContext: ISolrImportContext;
    Locales: Array = New Integer[1] = [LocaleCodeID.lcidRussian As Integer];
    ObjectClasses: Array Of UInteger;
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
    ImportExecutor := Schema.ImportExecutor[SearchEngineTargetType.settMbObject];
    ImportContext := ImportExecutor.CreateContext() As IMbObjectsImportContext;
    SolrContext := ImportContext As ISolrImportContext;
    SolrContext.CleanType := SolrImportCleanType.sictNone;
    SolrContext.Locales := Locales;
    //Objects being indexed
    ObjectClasses := New UInteger[2];
    ObjectClasses[0] := MetabaseObjectClass.KE_CLASS_STDCUBE;
    ObjectClasses[1] := MetabaseObjectClass.KE_CLASS_STDDIM;
    ImportContext.ClassIds := ObjectClasses;
    //Indexing
    ImportExecutor.Import(ImportContext);
End Sub;

On executing the example the context required for repository objects metadata indexing will be created. In the context settings the language used for indexing and classes of indexed objects - standard cubes and table dictionaries - will be determined. After determining all settings object metadata will be indexed.

See also:

IMbObjectsImportContext