Class AzureSearchCommitterConfig
java.lang.Object
com.norconex.committer.azuresearch.AzureSearchCommitterConfig
- All Implemented Interfaces:
Serializable
Azure Search Committer configuration.
- Author:
- Pascal Essiembre
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the Azure API admin key.Gets the Azure API version.Gets fields which values should always be treated as array.Gets the Azure Search endpoint (https://[service name].search.windows.net).Gets the index name.Gets the proxy settings.Gets the document field name containing the value to be stored in Azure Search document key field.Gets the name of the Azure Search field where content will be stored.Gets the name of Azure Search key field where to store a document unique identifier (sourceKeyField).inthashCode()booleanGets whether the list of fields to be always treated as array is represented as regular expression.booleanWhether to disable document reference encoding.booleanWhether to ignore response errors.booleanWhether to ignore validation errors.booleanWhether to use integrated Windows Authentication (if applicable).voidSets the Azure API admin key.voidsetApiVersion(String apiVersion) Sets the Azure API version.voidsetArrayFields(String arrayFields) Sets fields which values should always be treated as array.voidsetArrayFieldsRegex(boolean arrayFieldsRegex) Sets whether the list of fields to be always treated as array is represented as regular expression.voidsetDisableDocKeyEncoding(boolean disableReferenceEncoding) Sets whether to disable document reference encoding.voidsetEndpoint(String endpoint) Sets the Azure Search endpoint (https://[service name].search.windows.net).voidsetIgnoreResponseErrors(boolean ignoreResponseErrors) Sets whether to ignore response errors.voidsetIgnoreValidationErrors(boolean ignoreValidationErrors) Sets whether to ignore validation errors.voidsetIndexName(String indexName) Sets the index name.voidsetSourceKeyField(String sourceKeyField) Sets the document field name containing the value to be stored in Azure Search key field.voidsetTargetContentField(String targetContentField) Sets the name of the Azure Search field where content will be stored.voidsetTargetKeyField(String targetKeyField) Sets the name of the Azure Search document key field where to store a document unique identifier (sourceKeyField).voidsetUseWindowsAuth(boolean useWindowsAuth) Sets whether to use integrated Windows Authentication (if applicable).toString()
-
Field Details
-
DEFAULT_API_VERSION
Default Azure Search API version- See Also:
-
DEFAULT_AZURE_KEY_FIELD
Default Azure Search document key field- See Also:
-
DEFAULT_AZURE_CONTENT_FIELD
Default Azure Search content field- See Also:
-
-
Constructor Details
-
AzureSearchCommitterConfig
public AzureSearchCommitterConfig()
-
-
Method Details
-
getIndexName
Gets the index name.- Returns:
- index name
-
setIndexName
Sets the index name.- Parameters:
indexName- the index name
-
getEndpoint
Gets the Azure Search endpoint (https://[service name].search.windows.net).- Returns:
- Azure Search endpoint
-
setEndpoint
Sets the Azure Search endpoint (https://[service name].search.windows.net).- Parameters:
endpoint- Azure Search endpoint
-
getApiVersion
Gets the Azure API version. Default isDEFAULT_API_VERSION.- Returns:
- the Azure API version
-
setApiVersion
Sets the Azure API version.- Parameters:
apiVersion- Azure API version
-
getApiKey
Gets the Azure API admin key.- Returns:
- Azure API admin key
-
setApiKey
Sets the Azure API admin key.- Parameters:
apiKey- Azure API admin key
-
isDisableDocKeyEncoding
public boolean isDisableDocKeyEncoding()Whether to disable document reference encoding. By default, references are encoded using a URL-safe Base64 encoding. Whentrue, document references will be sent as is if they pass validation.- Returns:
trueif disabling reference encoding
-
setDisableDocKeyEncoding
public void setDisableDocKeyEncoding(boolean disableReferenceEncoding) Sets whether to disable document reference encoding. Whenfalse, references are encoded using a URL-safe Base64 encoding. Whentrue, document references will be sent as is if they pass validation.- Parameters:
disableReferenceEncoding-trueif disabling reference encoding
-
isIgnoreValidationErrors
public boolean isIgnoreValidationErrors()Whether to ignore validation errors. By default, an exception is thrown if a document contains a field that Azure Search will reject. Whentruethe validation errors are logged instead and the faulty field or document is not committed.- Returns:
truewhen ignoring validation errors
-
setIgnoreValidationErrors
public void setIgnoreValidationErrors(boolean ignoreValidationErrors) Sets whether to ignore validation errors. Whenfalse, an exception is thrown if a document contains a field that Azure Search will reject. Whentruethe validation errors are logged instead and the faulty field or document is not committed.- Parameters:
ignoreValidationErrors-truewhen ignoring validation errors
-
isIgnoreResponseErrors
public boolean isIgnoreResponseErrors()Whether to ignore response errors. By default, an exception is thrown if the Azure Search response contains an error. Whentruethe errors are logged instead.- Returns:
truewhen ignoring response errors
-
setIgnoreResponseErrors
public void setIgnoreResponseErrors(boolean ignoreResponseErrors) Sets whether to ignore response errors. Whenfalse, an exception is thrown if the Azure Search response contains an error. Whentruethe errors are logged instead.- Parameters:
ignoreResponseErrors-truewhen ignoring response errors
-
getProxySettings
Gets the proxy settings.- Returns:
- proxy settings (never
null).
-
isUseWindowsAuth
public boolean isUseWindowsAuth()Whether to use integrated Windows Authentication (if applicable).- Returns:
trueif using Windows Authentication
-
setUseWindowsAuth
public void setUseWindowsAuth(boolean useWindowsAuth) Sets whether to use integrated Windows Authentication (if applicable).- Parameters:
useWindowsAuth-trueif using Windows Authentication
-
getArrayFields
Gets fields which values should always be treated as array. Expects a comma-separated-value list or regular expression, based on the returned value ofisArrayFieldsRegex().- Returns:
- list of fields or regular expression matching fields
- See Also:
-
setArrayFields
Sets fields which values should always be treated as array. Either a comma-separated-value list or regular expression, based on the returned value ofisArrayFieldsRegex().- Parameters:
arrayFields- list of fields or regular expression matching fields- See Also:
-
isArrayFieldsRegex
public boolean isArrayFieldsRegex()Gets whether the list of fields to be always treated as array is represented as regular expression.- Returns:
trueif regular expression- See Also:
-
setArrayFieldsRegex
public void setArrayFieldsRegex(boolean arrayFieldsRegex) Sets whether the list of fields to be always treated as array is represented as regular expression.- Parameters:
arrayFieldsRegex-trueif regular expression- See Also:
-
getSourceKeyField
Gets the document field name containing the value to be stored in Azure Search document key field. Default is not a field, but rather the document reference.- Returns:
- name of field containing id value
-
setSourceKeyField
Sets the document field name containing the value to be stored in Azure Search key field. Setnullto use the document reference instead of a field (default).- Parameters:
sourceKeyField- name of field containing id value, ornull
-
getTargetKeyField
Gets the name of Azure Search key field where to store a document unique identifier (sourceKeyField). Default is "id".- Returns:
- name of Solr ID field
-
setTargetKeyField
Sets the name of the Azure Search document key field where to store a document unique identifier (sourceKeyField). If not specified, default is "id".- Parameters:
targetKeyField- name of Solr ID field
-
getTargetContentField
Gets the name of the Azure Search field where content will be stored. Default is "content".- Returns:
- field name
-
setTargetContentField
Sets the name of the Azure Search field where content will be stored. Specifying anullvalue will disable storing the content.- Parameters:
targetContentField- field name
-
equals
-
hashCode
public int hashCode() -
toString
-