Indexing

After getting access to the object that executes indexing, prepare a context with indexing settings. To create a context, use the IImportExecutor.CreateContext method. Depending on what will be indexed (data source structures or repository object metadata), cast method result to one of two interfaces: ISourceDataImportContext and IMbObjectsImportContext. To specify parameters of the indexing process execution, one can also cast the result of the IImportExecutor.CreateContext method to the ISolrImportContext interface.

After all indexed sources are specified, send the configured context to the IImportExecutor.Import method. On executing the method the required documents are generated, which will be sent for further processing and storing in the Apache Solr. On indexing the Solr instances corresponding to the specified purpose (the purpose is specified in the input parameter of the IImportExecutor.CreateContext method) and to the languages (specified in the ISolrImportContext.Locales property) are used automatically.

Indexing of Repository Objects Metadata

Several ways can be used to determine repository objects, for which it is necessary to index metadata:

After specifying required objects, send the configured context to the IImportExecutor.Import method. On executing the method the required documents are generated, which will be sent for further processing and storing in the Apache Solr. On indexing the Solr instances corresponding to the specified purpose (the purpose is specified in the input parameter of the IImportExecutor.CreateContext method) and to the languages (specified in the ISolrImportContext.Locales property) are used automatically.

See also:

Introduction