ISolrOperations.GetOverview

Fore Syntax

GetOverview(Core: ISolrSearchEngineCore): ISolrCoreInfo;

Fore.NET Syntax

GetOverview(Core: Prognoz.Platform.Interop.BISearch.ISolrSearchEngineCore): Prognoz.Platform.Interop.BISearch.ISolrCoreInfo;

Parameters

Core. The Solr instance information about which should be obtained.

Description

The GetOverview method extracts information about the specified Solr instance.

Comments

List of the Solr instances can be get in the ISolrSearchEngineService.Cores property.

Fore Example

It is supposed that the repository is set to work with search service based on Apache Solr. Connect the BISearch, Fore, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    SharedParams: ISharedParams;
    SearchEngine: ISolrSearchEngineService;
    Core: ISolrSearchEngineCore;
    Operations: ISolrOperations;
    Info: ISolrCoreInfo;
Begin
    MB := MetabaseClass.Active;
    //Parameters of search and indexing set for repository
    SharedParams := MB.SpecialObject(MetabaseSpecialObject.SharedParams).Bind As ISharedParams;
    SearchEngine := SharedParams.SearchEngine As ISolrSearchEngineService;
    Core := SearchEngine.Cores.Item(0);
    Operations := New SolrOperations.Create;
    //Get information about the Solr instance
    Info := Operations.GetOverview(Core);
    If Info.HasDeletions Then
        Debug.WriteLine("Number of removed documents: " + Info.DeletedDocs.ToString);
    End If;
    Debug.WriteLine("Date or time of the last modifications: " + Info.LastModified.ToString);
    Debug.WriteLine("Current or maximum number of documents: " + Info.NumDocs.ToString + "/" + Info.MaxDoc.ToString);
End Sub UserProc;

On executing the example information about the specified Solr instance will be obtained. Information will be displayed to the development environment console.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.BISearch;
Imports Prognoz.Platform.Interop.KeFore;
Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    SharedParams: ISharedParams;
    SearchEngine: ISolrSearchEngineService;
    Core: ISolrSearchEngineCore;
    Operations: ISolrOperations = New SolrOperationsClass();
    Info: ISolrCoreInfo;
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;
    Core := SearchEngine.Cores.Item[0];
    //Get information about the Solr instance
    Info := Operations.GetOverview(Core);
    If Info.HasDeletions Then
        System.Diagnostics.Debug.WriteLine("Number of removed documents: " + Info.DeletedDocs.ToString());
    End If;
    System.Diagnostics.Debug.WriteLine("Date or time of the last modifications: " + Info.LastModified.ToString());
    System.Diagnostics.Debug.WriteLine("Current or maximum number of documents: " + Info.NumDocs.ToString() + "/" + Info.MaxDoc.ToString());
End Sub;

See also:

ISolrOperations