Package com.norconex.committer.solr
Class SolrCommitterConfig
java.lang.Object
com.norconex.committer.core.BaseCommitterConfig
com.norconex.committer.core.batch.BaseBatchCommitterConfig
com.norconex.committer.solr.SolrCommitterConfig
Configuration for SolrCommitter.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanGets Solr authentication credentials.The type of Solr client.The endpoint URL used to connect to Solr (as per the client type selected).The document field name containing the value to be stored in Solr ID field.The name of the Solr field where content will be stored.The name of the Solr field where to store a document unique identifier (sourceIdField).getUpdateUrlParam(String name) Gets a URL parameter value by its parameter name.Gets the update URL parameter names.Gets URL parameters to be added on Solr HTTP calls.inthashCode()booleanWhether to send an explicit commit request at the end of every batch, or let the server auto-commit.voidsetCredentials(Credentials credentials) Sets Solr authentication credentials.setSolrClientType(SolrClientType solrClientType) The type of Solr client.setSolrCommitDisabled(boolean solrCommitDisabled) Whether to send an explicit commit request at the end of every batch, or let the server auto-commit.setSolrURL(String solrURL) The endpoint URL used to connect to Solr (as per the client type selected).setSourceIdField(String sourceIdField) The document field name containing the value to be stored in Solr ID field.setTargetContentField(String targetContentField) The name of the Solr field where content will be stored.setTargetIdField(String targetIdField) The name of the Solr field where to store a document unique identifier (sourceIdField).voidsetUpdateUrlParam(String name, String value) Sets a URL parameter to be added on Solr HTTP calls.voidsetUpdateUrlParams(Map<String, String> updateUrlParams) Sets URL parameters to be added on Solr HTTP calls.toString()Methods inherited from class com.norconex.committer.core.batch.BaseBatchCommitterConfig
getQueue, setQueueMethods inherited from class com.norconex.committer.core.BaseCommitterConfig
addRestriction, addRestrictions, clearFieldMappings, clearRestrictions, getFieldMappings, getRestrictions, removeFieldMapping, removeRestriction, removeRestriction, setFieldMapping, setFieldMappings
-
Field Details
-
DEFAULT_SOLR_ID_FIELD
Default Solr ID field- See Also:
-
DEFAULT_SOLR_CONTENT_FIELD
Default Solr content field- See Also:
-
-
Constructor Details
-
SolrCommitterConfig
public SolrCommitterConfig()
-
-
Method Details
-
getUpdateUrlParams
Gets URL parameters to be added on Solr HTTP calls.- Returns:
- a map of parameter names and values
-
setUpdateUrlParams
Sets URL parameters to be added on Solr HTTP calls.- Parameters:
updateUrlParams- a map of parameter names and values
-
setUpdateUrlParam
Sets a URL parameter to be added on Solr HTTP calls.- Parameters:
name- parameter namevalue- parameter value
-
getUpdateUrlParam
Gets a URL parameter value by its parameter name.- Parameters:
name- parameter name- Returns:
- parameter value
-
getUpdateUrlParamNames
Gets the update URL parameter names.- Returns:
- parameter names
-
getCredentials
Gets Solr authentication credentials.- Returns:
- credentials
-
setCredentials
Sets Solr authentication credentials.- Parameters:
credentials- the credentials
-
getSolrClientType
The type of Solr client. -
getSolrURL
The endpoint URL used to connect to Solr (as per the client type selected). -
isSolrCommitDisabled
public boolean isSolrCommitDisabled()Whether to send an explicit commit request at the end of every batch, or let the server auto-commit. -
getSourceIdField
The document field name containing the value to be stored in Solr ID field. Anullvalue (default) will use the document reference instead of a document field. -
getTargetIdField
The name of the Solr field where to store a document unique identifier (sourceIdField). Default is "id". -
getTargetContentField
The name of the Solr field where content will be stored. Default is "content". Anullvalue will disable storing the content. -
setSolrClientType
The type of Solr client.- Returns:
this.
-
setSolrURL
The endpoint URL used to connect to Solr (as per the client type selected).- Returns:
this.
-
setSolrCommitDisabled
Whether to send an explicit commit request at the end of every batch, or let the server auto-commit.- Returns:
this.
-
setSourceIdField
The document field name containing the value to be stored in Solr ID field. Anullvalue (default) will use the document reference instead of a document field.- Returns:
this.
-
setTargetIdField
The name of the Solr field where to store a document unique identifier (sourceIdField). Default is "id".- Returns:
this.
-
setTargetContentField
The name of the Solr field where content will be stored. Default is "content". Anullvalue will disable storing the content.- Returns:
this.
-
equals
- Overrides:
equalsin classBaseBatchCommitterConfig
-
canEqual
- Overrides:
canEqualin classBaseBatchCommitterConfig
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseBatchCommitterConfig
-
toString
- Overrides:
toStringin classBaseBatchCommitterConfig
-