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โ
- YAML
- JSON
- XML
class: SolrCommitter
solrUrl: http://localhost:8983/solr
solrCollection: mycollection
{
"class": "SolrCommitter",
"solrUrl": "http://localhost:8983/solr",
"solrCollection": "mycollection"
}
<class>SolrCommitter</class>
<solrUrl>http://localhost:8983/solr</solrUrl>
<solrCollection>mycollection</solrCollection>
Usageโ
Full configuration skeleton, with every option and its default
- YAML
- JSON
- XML
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: {}
{
"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": {}
}
<solrCommitter>
<class>SolrCommitter</class>
<credentials>
<password>string</password>
<passwordKey>
<size>0</size>
<source>KEY</source>
<value>string</value>
</passwordKey>
<username>string</username>
</credentials>
<fieldMappings/>
<queue>
<class>FsQueue</class>
<batchSize>0</batchSize>
<commitLeftoversOnInit>false</commitLeftoversOnInit>
<maxPerFolder>0</maxPerFolder>
<onCommitFailure/>
</queue>
<restrictions>
<restriction>
<fieldMatcher/>
<valueMatcher/>
</restriction>
</restrictions>
<solrClientType>CloudSolrClient</solrClientType>
<solrCommitDisabled>false</solrCommitDisabled>
<solrURL>string</solrURL>
<sourceIdField>string</sourceIdField>
<targetContentField>string</targetContentField>
<targetIdField>string</targetIdField>
<updateUrlParams/>
</solrCommitter>
Propertiesโ
| Property | Type | Required | Default |
|---|---|---|---|
credentials | Credentials | No | Credentials |
fieldMappings | Record<string, string> | No | - |
queue | CommitterQueue | No | FsQueue |
restrictions | PropertyMatcher[] | No | - |
solrClientType | enum | No | - |
solrCommitDisabled | boolean | No | false |
solrURL | string | No | - |
sourceIdField | string | No | - |
targetContentField | string | No | content |
targetIdField | string | No | id |
updateUrlParams | Record<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โ
CloudSolrClientHttpJettySolrClientLBJettySolrClientConcurrentUpdateJettySolrClientHttpJdkSolrClientHttpSolrClientLBHttpSolrClientConcurrentUpdateSolrClient
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.