ISourceDataImportDestinationInfo.Destination

Syntax

Destination: ICubeModelDestination;

Description

The Destination property returns the display version, for which indexing settings are determined.

Example

Executing the example requires that the repository contains a scheduled tasks container with the TASK_CONTAINER identifier. One search index refresh task is created in the container. The task is set up to refresh search index for several sources. Add links to the BiSearch, Cubes, Fore, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Container: IScheduledTasksContainer;
    Task: ISearchEngineImportScheduledTask;
    EngineSchema: ISolrSearchEngineSchema;
    ImportContext: ISourceDataImportContext;
    SourceInfos: ISourceDataImportInfos;
    SourceInfo: ISourceDataImportInfo;
    DestinationInfos: ISourceDataImportDestinationInfos;
    CubeDest: ICubeModelDestination;
    i, j: Integer;
Begin
    MB := MetabaseClass.Active;
    //Get task
    Container := MB.ItemById("TASK_CONTAINER").Bind As IScheduledTasksContainer;
    Task := Container.Tasks.Item(0).Bind As ISearchEngineImportScheduledTask;
    //Context to index objects
    EngineSchema := Task.Engine.SearchEngineSchema As ISolrSearchEngineSchema;
    ImportContext := Task.ImportContext(SearchEngineTargetType.SourceData) As ISourceDataImportContext;
    //Get indexed objects
    SourceInfos := ImportContext.SourceInfos;
    //View information
    For i := 0 To SourceInfos.Count - 1 Do
        SourceInfo := SourceInfos.Item(i);
        Debug.WriteLine("Source: " + MB.Item(SourceInfo.Key).Name + "(Key: " + SourceInfo.Key.ToString + ')');
        Debug.WriteLine("Indexed display versions:");
        Debug.Indent;
        DestinationInfos := SourceInfo.DestinationInfos;
        For j := 0 To DestinationInfos.Count - 1 Do
            CubeDest := DestinationInfos.Item(j).Destination;
            Debug.WriteLine(CubeDest.Name + '(' + CubeDest.Id + ')');
        End For;
        Debug.Unindent;
    End For;
End Sub UserProc;

On executing the example the development environment console displays information about sources and its display versions, which will be used on search index refresh.

See also:

ISourceDataImportDestinationInfo