ClearAll(Core: ISolrSearchEngineCore): Boolean;
Core. The Solr instance, for which indexed documents must be cleared.
The ClearAll method deletes all documents with indexed data for the specified Solr instance.
The list of the Solr instances can be obtained in the ISolrSearchEngineService.Cores property.
Sub UserProc;
Var
MB: IMetabase;
SharedParams: ISharedParams;
SearchEngine: ISolrSearchEngineService;
Core: ISolrSearchEngineCore;
Operations: ISolrOperations;
Begin
MB := MetabaseClass.Active;
//Get search and indexing parameters
SharedParams := MB.SpecialObject(MetabaseSpecialObject.SharedParams).Bind As ISharedParams;
SearchEngine := SharedParams.SearchEngine As ISolrSearchEngineService;
Core := SearchEngine.Cores.Item(0);
Operations := New SolrOperations.Create;
Operations.ClearAll(Core);
End Sub UserProc;
On executing the example the search index for the specified Solr instance will be cleared.
See also: