IMbObjectsImportContext.ClassIds

Fore.NET Syntax

ClassIds: Array;

Description

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

Comments

Determine an integer array as a property value. 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 indexing mode, indexing with code in the Fore language is not supported. Develop in 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;
    //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
    ImportExecutor := Schema.ImportExecutor[SearchEngineTargetType.settMbObject];
    ImportContext := ImportExecutor.CreateContext() As IMbObjectsImportContext;
    SolrContext := ImportContext As ISolrImportContext;
    SolrContext.CleanType := SolrImportCleanType.sictNone;
    SolrContext.Locales := Locales;
    //Indexed objects
    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. The language used for indexing and classes of indexed objects - standard cubes and table dictionaries - will be determined in the settings. After all settings are determined, object metadata will be indexed.

See also:

IMbObjectsImportContext