ISolrSearchEngineSchema.ImportProcessOptions

Syntax

ImportProcessOptions: ISolrImportProcessOptions;

Description

The ImportProcessOptions property returns parameters used on indexing of data or metadata.

Example

Executing the example requires that the repository contains an assembly with the CUSTOMVALUES identifier. The assembly implements the CSolrImportCustomValues class used to fill in values of custom fields on indexing. The class must contain implementation of the ISolrImportCustomValues interface. Add links to the BISearch, Fore, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    SharedParams: ISharedParams;
    SearchEngine: ISolrSearchEngineService;
    Schema: ISolrSearchEngineSchema;
    Options: ISolrImportProcessOptions;
    Binding: ISolrImportCustomBinding;
Begin
    MB := MetabaseClass.Active;
    SharedParams := MB.SpecialObject(MetabaseSpecialObject.SharedParams).Edit As ISharedParams;
    SearchEngine := SharedParams.SearchEngine As ISolrSearchEngineService;
    Schema := SearchEngine.SearchEngineSchema As ISolrSearchEngineSchema;
    //Change settings
    Options := Schema.ImportProcessOptions;
    Options.BlockSize := 1000;
    Options.QueryMaxSize := 1048576;
    Options.ThreadsCount := 4;
    Options.NeedSmartSearch := True;
    Binding := Options.ImportBinding;
    Binding.Assembly := MB.ItemById("CUSTOMVALUES");
    Binding.ClassName := "CSolrImportCustomValues";
    //Save
    SharedParams.SearchEngine := SearchEngine;
    (SharedParams As IMetabaseObject).Save;
End Sub UserProc;

On executing the example indexing settings will be determined in the repository: values used on matrix building will be determined, maximum size of the created XML document, which will be sent for indexing to the Apache Solr server, will be set and the assembly and class that are used to process custom fields are also determined.

See also:

ISolrSearchEngineSchema