Class GoogleCloudSearchCommitterConfig

All Implemented Interfaces:
Serializable

public class GoogleCloudSearchCommitterConfig extends BaseBatchCommitterConfig implements Serializable

Google Cloud Search Committer configuration.

See Also:
  • Field Details

    • DEFAULT_APPLICATION_NAME

      public static final String DEFAULT_APPLICATION_NAME
      Default Google Cloud Search committer application name.
      See Also:
    • DEFAULT_TITLE_SOURCE_FIELD

      public static final String DEFAULT_TITLE_SOURCE_FIELD
      Default document title metadata source field.
      See Also:
    • DEFAULT_OBJECT_TYPE_SOURCE_FIELD

      public static final String DEFAULT_OBJECT_TYPE_SOURCE_FIELD
      Default document object type metadata source field.
      See Also:
    • DEFAULT_OBJECT_TYPE

      public static final String DEFAULT_OBJECT_TYPE
      Default object type value when no metadata value is provided.
      See Also:
    • DEFAULT_UPDATE_TIME_SOURCE_FIELD

      public static final String DEFAULT_UPDATE_TIME_SOURCE_FIELD
      Default update time metadata source field.
      See Also:
  • Constructor Details

    • GoogleCloudSearchCommitterConfig

      public GoogleCloudSearchCommitterConfig()
  • Method Details

    • getAclMappings

    • setAclMappings

    • getMetadataMappings

    • setMetadataMappings

    • getStructuredDataMappings

      public List<GoogleCloudSearchCommitterConfig.StructuredDataMapping> getStructuredDataMappings()
    • setStructuredDataMappings

      public GoogleCloudSearchCommitterConfig setStructuredDataMappings(List<GoogleCloudSearchCommitterConfig.StructuredDataMapping> structuredDataMappings)
    • getSecretKeyPath

      public String getSecretKeyPath()
      Path to the Google service account JSON key file, with access to the Cloud Search indexing API.
    • getDataSourceId

      public String getDataSourceId()
      The Google Cloud Search data source ID to index documents into.
    • getUploadFormat

      The format used to upload document content. Default is GoogleCloudSearchCommitterConfig.UploadFormat.RAW.
    • getRequestMode

      The priority/consistency mode sent with indexing and delete requests. Default is GoogleCloudSearchCommitterConfig.RequestMode.ASYNCHRONOUS, suited to content connectors performing full or incremental crawls.
    • getApiEndpoint

      public String getApiEndpoint()
      Overrides the Google Cloud Search API root URL. Mainly useful for testing against a local mock server.
    • getApplicationName

      public String getApplicationName()
      The application name sent to Google Cloud Search. Default is "Norconex Google Cloud Search Committer".
    • getConnectorName

      public String getConnectorName()
      The connector name sent with indexing requests. Defaults to the application name when not set.
    • getHttpConnectTimeoutMillis

      public int getHttpConnectTimeoutMillis()
      Optional HTTP connect timeout in milliseconds applied to Google API requests. Use -1 to keep Google client defaults.
    • getHttpReadTimeoutMillis

      public int getHttpReadTimeoutMillis()
      Optional HTTP read timeout in milliseconds applied to Google API requests. Use -1 to keep Google client defaults.
    • getHttpMaxRetries

      public int getHttpMaxRetries()
      Optional HTTP retry count for Google API requests. Use -1 to keep Google client defaults.
    • getHttpBackoffInitialIntervalMillis

      public int getHttpBackoffInitialIntervalMillis()
      Optional exponential backoff initial interval in milliseconds. Use -1 to keep Google client defaults.
    • getHttpBackoffMaxIntervalMillis

      public int getHttpBackoffMaxIntervalMillis()
      Optional exponential backoff maximum interval in milliseconds. Use -1 to keep Google client defaults.
    • getHttpBackoffMaxElapsedTimeMillis

      public int getHttpBackoffMaxElapsedTimeMillis()
      Optional exponential backoff maximum elapsed time in milliseconds. Use -1 to keep Google client defaults.
    • getSourceIdField

      public String getSourceIdField()
      Metadata field holding the value to use as the document unique identifier. Defaults to the document reference.
    • isKeepSourceIdField

      public boolean isKeepSourceIdField()
      Whether to keep the source ID field in the document metadata after it has been extracted.
    • isFailOnDeleteNotFound

      public boolean isFailOnDeleteNotFound()
      Whether a delete request targeting an item that does not exist in the index is treated as a failure. Crawlers routinely delete references that were never indexed (rejected, orphan or unmodified documents), and Google Cloud Search answers those with a "404 NOT_FOUND". Since the desired outcome (the item is absent) already holds, such responses are ignored by default. Set to true to have them fail the batch instead. Only delete requests are affected: a "404" on an index request always fails, since it signals a bad data source or connector name.
    • getAclInheritance

      ACL inheritance configuration, mapping a metadata field holding a parent item reference to an ACL inheritance type.
    • setSecretKeyPath

      public GoogleCloudSearchCommitterConfig setSecretKeyPath(String secretKeyPath)
      Path to the Google service account JSON key file, with access to the Cloud Search indexing API.
      Returns:
      this.
    • setDataSourceId

      public GoogleCloudSearchCommitterConfig setDataSourceId(String dataSourceId)
      The Google Cloud Search data source ID to index documents into.
      Returns:
      this.
    • setUploadFormat

      The format used to upload document content. Default is GoogleCloudSearchCommitterConfig.UploadFormat.RAW.
      Returns:
      this.
    • setRequestMode

      The priority/consistency mode sent with indexing and delete requests. Default is GoogleCloudSearchCommitterConfig.RequestMode.ASYNCHRONOUS, suited to content connectors performing full or incremental crawls.
      Returns:
      this.
    • setApiEndpoint

      public GoogleCloudSearchCommitterConfig setApiEndpoint(String apiEndpoint)
      Overrides the Google Cloud Search API root URL. Mainly useful for testing against a local mock server.
      Returns:
      this.
    • setApplicationName

      public GoogleCloudSearchCommitterConfig setApplicationName(String applicationName)
      The application name sent to Google Cloud Search. Default is "Norconex Google Cloud Search Committer".
      Returns:
      this.
    • setConnectorName

      public GoogleCloudSearchCommitterConfig setConnectorName(String connectorName)
      The connector name sent with indexing requests. Defaults to the application name when not set.
      Returns:
      this.
    • setHttpConnectTimeoutMillis

      public GoogleCloudSearchCommitterConfig setHttpConnectTimeoutMillis(int httpConnectTimeoutMillis)
      Optional HTTP connect timeout in milliseconds applied to Google API requests. Use -1 to keep Google client defaults.
      Returns:
      this.
    • setHttpReadTimeoutMillis

      public GoogleCloudSearchCommitterConfig setHttpReadTimeoutMillis(int httpReadTimeoutMillis)
      Optional HTTP read timeout in milliseconds applied to Google API requests. Use -1 to keep Google client defaults.
      Returns:
      this.
    • setHttpMaxRetries

      public GoogleCloudSearchCommitterConfig setHttpMaxRetries(int httpMaxRetries)
      Optional HTTP retry count for Google API requests. Use -1 to keep Google client defaults.
      Returns:
      this.
    • setHttpBackoffInitialIntervalMillis

      public GoogleCloudSearchCommitterConfig setHttpBackoffInitialIntervalMillis(int httpBackoffInitialIntervalMillis)
      Optional exponential backoff initial interval in milliseconds. Use -1 to keep Google client defaults.
      Returns:
      this.
    • setHttpBackoffMaxIntervalMillis

      public GoogleCloudSearchCommitterConfig setHttpBackoffMaxIntervalMillis(int httpBackoffMaxIntervalMillis)
      Optional exponential backoff maximum interval in milliseconds. Use -1 to keep Google client defaults.
      Returns:
      this.
    • setHttpBackoffMaxElapsedTimeMillis

      public GoogleCloudSearchCommitterConfig setHttpBackoffMaxElapsedTimeMillis(int httpBackoffMaxElapsedTimeMillis)
      Optional exponential backoff maximum elapsed time in milliseconds. Use -1 to keep Google client defaults.
      Returns:
      this.
    • setSourceIdField

      public GoogleCloudSearchCommitterConfig setSourceIdField(String sourceIdField)
      Metadata field holding the value to use as the document unique identifier. Defaults to the document reference.
      Returns:
      this.
    • setKeepSourceIdField

      public GoogleCloudSearchCommitterConfig setKeepSourceIdField(boolean keepSourceIdField)
      Whether to keep the source ID field in the document metadata after it has been extracted.
      Returns:
      this.
    • setFailOnDeleteNotFound

      public GoogleCloudSearchCommitterConfig setFailOnDeleteNotFound(boolean failOnDeleteNotFound)
      Whether a delete request targeting an item that does not exist in the index is treated as a failure. Crawlers routinely delete references that were never indexed (rejected, orphan or unmodified documents), and Google Cloud Search answers those with a "404 NOT_FOUND". Since the desired outcome (the item is absent) already holds, such responses are ignored by default. Set to true to have them fail the batch instead. Only delete requests are affected: a "404" on an index request always fails, since it signals a bad data source or connector name.
      Returns:
      this.
    • setAclInheritance

      ACL inheritance configuration, mapping a metadata field holding a parent item reference to an ACL inheritance type.
      Returns:
      this.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class BaseBatchCommitterConfig
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class BaseBatchCommitterConfig
    • hashCode

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

      public String toString()
      Overrides:
      toString in class BaseBatchCommitterConfig