Class AzureSearchCommitterConfig

java.lang.Object
com.norconex.committer.azuresearch.AzureSearchCommitterConfig
All Implemented Interfaces:
Serializable

public class AzureSearchCommitterConfig extends Object implements Serializable

Azure Search Committer configuration.

Author:
Pascal Essiembre
See Also:
  • Field Details

    • DEFAULT_API_VERSION

      public static final String DEFAULT_API_VERSION
      Default Azure Search API version
      See Also:
    • DEFAULT_AZURE_KEY_FIELD

      public static final String DEFAULT_AZURE_KEY_FIELD
      Default Azure Search document key field
      See Also:
    • DEFAULT_AZURE_CONTENT_FIELD

      public static final String DEFAULT_AZURE_CONTENT_FIELD
      Default Azure Search content field
      See Also:
  • Constructor Details

    • AzureSearchCommitterConfig

      public AzureSearchCommitterConfig()
  • Method Details

    • getIndexName

      public String getIndexName()
      Gets the index name.
      Returns:
      index name
    • setIndexName

      public void setIndexName(String indexName)
      Sets the index name.
      Parameters:
      indexName - the index name
    • getEndpoint

      public String getEndpoint()
      Gets the Azure Search endpoint (https://[service name].search.windows.net).
      Returns:
      Azure Search endpoint
    • setEndpoint

      public void setEndpoint(String endpoint)
      Sets the Azure Search endpoint (https://[service name].search.windows.net).
      Parameters:
      endpoint - Azure Search endpoint
    • getApiVersion

      public String getApiVersion()
      Gets the Azure API version. Default is DEFAULT_API_VERSION.
      Returns:
      the Azure API version
    • setApiVersion

      public void setApiVersion(String apiVersion)
      Sets the Azure API version.
      Parameters:
      apiVersion - Azure API version
    • getApiKey

      public String getApiKey()
      Gets the Azure API admin key.
      Returns:
      Azure API admin key
    • setApiKey

      public void setApiKey(String apiKey)
      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. When true, document references will be sent as is if they pass validation.
      Returns:
      true if disabling reference encoding
    • setDisableDocKeyEncoding

      public void setDisableDocKeyEncoding(boolean disableReferenceEncoding)
      Sets whether to disable document reference encoding. When false, references are encoded using a URL-safe Base64 encoding. When true, document references will be sent as is if they pass validation.
      Parameters:
      disableReferenceEncoding - true if 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. When true the validation errors are logged instead and the faulty field or document is not committed.
      Returns:
      true when ignoring validation errors
    • setIgnoreValidationErrors

      public void setIgnoreValidationErrors(boolean ignoreValidationErrors)
      Sets whether to ignore validation errors. When false, an exception is thrown if a document contains a field that Azure Search will reject. When true the validation errors are logged instead and the faulty field or document is not committed.
      Parameters:
      ignoreValidationErrors - true when 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. When true the errors are logged instead.
      Returns:
      true when ignoring response errors
    • setIgnoreResponseErrors

      public void setIgnoreResponseErrors(boolean ignoreResponseErrors)
      Sets whether to ignore response errors. When false, an exception is thrown if the Azure Search response contains an error. When true the errors are logged instead.
      Parameters:
      ignoreResponseErrors - true when ignoring response errors
    • getProxySettings

      public ProxySettings getProxySettings()
      Gets the proxy settings.
      Returns:
      proxy settings (never null).
    • isUseWindowsAuth

      public boolean isUseWindowsAuth()
      Whether to use integrated Windows Authentication (if applicable).
      Returns:
      true if using Windows Authentication
    • setUseWindowsAuth

      public void setUseWindowsAuth(boolean useWindowsAuth)
      Sets whether to use integrated Windows Authentication (if applicable).
      Parameters:
      useWindowsAuth - true if using Windows Authentication
    • getArrayFields

      public String 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 of isArrayFieldsRegex().
      Returns:
      list of fields or regular expression matching fields
      See Also:
    • setArrayFields

      public void setArrayFields(String arrayFields)
      Sets fields which values should always be treated as array. Either a comma-separated-value list or regular expression, based on the returned value of isArrayFieldsRegex().
      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:
      true if 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 - true if regular expression
      See Also:
    • getSourceKeyField

      public String 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

      public void setSourceKeyField(String sourceKeyField)
      Sets the document field name containing the value to be stored in Azure Search key field. Set null to use the document reference instead of a field (default).
      Parameters:
      sourceKeyField - name of field containing id value, or null
    • getTargetKeyField

      public String 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

      public void setTargetKeyField(String targetKeyField)
      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

      public String getTargetContentField()
      Gets the name of the Azure Search field where content will be stored. Default is "content".
      Returns:
      field name
    • setTargetContentField

      public void setTargetContentField(String targetContentField)
      Sets the name of the Azure Search field where content will be stored. Specifying a null value will disable storing the content.
      Parameters:
      targetContentField - field name
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object