Skip to main content

SolrCommitter

Commit documents to Apache Solr search engine.

Notes

Commits crawled documents to an Apache Solr search engine. Supports multiple Solr client types, field mappings, optional explicit Solr commit control, custom URL parameters, and credential configuration.

Examples

class: SolrCommitter
solrUrl: http://localhost:8983/solr
solrCollection: mycollection

Usage

Full configuration skeleton, with every option and its default
class: SolrCommitter
credentials:
password: string
passwordKey:
size: 0
source: KEY
value: string
username: string
fieldMappings: {}
queue:
class: FsQueue
batchSize: 0
commitLeftoversOnInit: false
maxPerFolder: 0
onCommitFailure:
ignoreErrors: false
maxRetries: 0
retryDelay: 0
splitBatch: OFF
restrictions:
- fieldMatcher: {}
valueMatcher: {}
solrClientType: CloudSolrClient
solrCommitDisabled: false
solrURL: string
sourceIdField: string
targetContentField: string
targetIdField: string
updateUrlParams: {}

Properties

PropertyTypeRequiredDefault
credentialsCredentialsNoCredentials
fieldMappingsRecord<string, string>No-
queueCommitterQueueNoFsQueue
restrictionsPropertyMatcher[]No-
solrClientTypeenumNo-
solrCommitDisabledbooleanNofalse
solrURLstringNo-
sourceIdFieldstringNo-
targetContentFieldstringNocontent
targetIdFieldstringNoid
updateUrlParamsRecord<string, string>No-

Property Details

credentials

Username and password to a protected Solr.

fieldMappings

Mapping of source fields to target ones (Solr fields).

queue

Configures the committer queue used to batch documents before sending them to the target system. Adjust queue settings to tune throughput and memory usage.

restrictions

Defines filter conditions that restrict which documents this committer processes. Documents not matching the restrictions are ignored by this committer.

solrClientType

Type of Solr Client to use. Default client type is Http2SolrClient.

Allowed Values

  • CloudSolrClient
  • HttpJettySolrClient
  • LBJettySolrClient
  • ConcurrentUpdateJettySolrClient
  • HttpJdkSolrClient
  • HttpSolrClient
  • LBHttpSolrClient
  • ConcurrentUpdateSolrClient

solrCommitDisabled

Disable sending an explicit Solr commit request at the end of every batch sent, relying Solr to perform auto-commit instead.

solrURL

URL to Solr. Influenced by the client type chosen.

sourceIdField

Document field name containing the value that will be stored in Solr target ID field. Default is the document reference.

targetContentField

Solr field name to store a document content. Default is "content".

targetIdField

Solr field name where to store a document unique identifier (source ID field). Default is "id".

updateUrlParams

Parameters to be added on Solr HTTP calls.