ISolrOperations.GetOverview

Syntax

GetOverview(Core: ISolrSearchEngineCore): ISolrCoreInfo;

Parameters

Core. The Solr instance, information about which must be obtained.

Description

The GetOverview method extracts information about the specified Solr instance.

Comments

The list of the Solr instances can be obtained in the ISolrSearchEngineService.Cores property.

Example

It is supposed that the repository is set to work with search service based on Apache Solr. Add links to 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;
    //Search and indexing parameters specified 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 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 changes: " + 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 in the development environment console.

See also:

ISolrOperations