Class GoogleCloudSearchCommitterConfig
java.lang.Object
com.norconex.committer.core.BaseCommitterConfig
com.norconex.committer.core.batch.BaseBatchCommitterConfig
com.norconex.committer.googlecloudsearch.GoogleCloudSearchCommitterConfig
- All Implemented Interfaces:
Serializable
public class GoogleCloudSearchCommitterConfig
extends BaseBatchCommitterConfig
implements Serializable
Google Cloud Search Committer configuration.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeclares which metadata field holds a parent item reference to use for Google Cloud Search ACL inheritance.static enumHow ACLs are inherited from a parent item.static classMaps a metadata field to a Google Cloud Search ACL principal.static enumTarget of an ACL mapping.static classMaps crawler metadata fields to Google Cloud Search predefined metadata fields.static enumType of principal an ACL mapping resolves to.static enumPriority/consistency mode used for indexing and delete requests.static classDeclares the Google Cloud Search structured data value type to use for a given metadata field sent as structured data.static enumGoogle Cloud Search structured data value type.static enumFormat used to upload document content. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault Google Cloud Search committer application name.static final StringDefault object type value when no metadata value is provided.static final StringDefault document object type metadata source field.static final StringDefault document title metadata source field.static final StringDefault update time metadata source field. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanACL inheritance configuration, mapping a metadata field holding a parent item reference to an ACL inheritance type.Overrides the Google Cloud Search API root URL.The application name sent to Google Cloud Search.The connector name sent with indexing requests.The Google Cloud Search data source ID to index documents into.intOptional exponential backoff initial interval in milliseconds.intOptional exponential backoff maximum elapsed time in milliseconds.intOptional exponential backoff maximum interval in milliseconds.intOptional HTTP connect timeout in milliseconds applied to Google API requests.intOptional HTTP retry count for Google API requests.intOptional HTTP read timeout in milliseconds applied to Google API requests.The priority/consistency mode sent with indexing and delete requests.Path to the Google service account JSON key file, with access to the Cloud Search indexing API.Metadata field holding the value to use as the document unique identifier.The format used to upload document content.inthashCode()booleanWhether a delete request targeting an item that does not exist in the index is treated as a failure.booleanWhether to keep the source ID field in the document metadata after it has been extracted.ACL inheritance configuration, mapping a metadata field holding a parent item reference to an ACL inheritance type.setAclMappings(List<GoogleCloudSearchCommitterConfig.AclMapping> aclMappings) setApiEndpoint(String apiEndpoint) Overrides the Google Cloud Search API root URL.setApplicationName(String applicationName) The application name sent to Google Cloud Search.setConnectorName(String connectorName) The connector name sent with indexing requests.setDataSourceId(String dataSourceId) The Google Cloud Search data source ID to index documents into.setFailOnDeleteNotFound(boolean failOnDeleteNotFound) Whether a delete request targeting an item that does not exist in the index is treated as a failure.setHttpBackoffInitialIntervalMillis(int httpBackoffInitialIntervalMillis) Optional exponential backoff initial interval in milliseconds.setHttpBackoffMaxElapsedTimeMillis(int httpBackoffMaxElapsedTimeMillis) Optional exponential backoff maximum elapsed time in milliseconds.setHttpBackoffMaxIntervalMillis(int httpBackoffMaxIntervalMillis) Optional exponential backoff maximum interval in milliseconds.setHttpConnectTimeoutMillis(int httpConnectTimeoutMillis) Optional HTTP connect timeout in milliseconds applied to Google API requests.setHttpMaxRetries(int httpMaxRetries) Optional HTTP retry count for Google API requests.setHttpReadTimeoutMillis(int httpReadTimeoutMillis) Optional HTTP read timeout in milliseconds applied to Google API requests.setKeepSourceIdField(boolean keepSourceIdField) Whether to keep the source ID field in the document metadata after it has been extracted.setMetadataMappings(List<GoogleCloudSearchCommitterConfig.MetadataMapping> metadataMappings) The priority/consistency mode sent with indexing and delete requests.setSecretKeyPath(String secretKeyPath) Path to the Google service account JSON key file, with access to the Cloud Search indexing API.setSourceIdField(String sourceIdField) Metadata field holding the value to use as the document unique identifier.setStructuredDataMappings(List<GoogleCloudSearchCommitterConfig.StructuredDataMapping> structuredDataMappings) setUploadFormat(GoogleCloudSearchCommitterConfig.UploadFormat uploadFormat) The format used to upload document content.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_APPLICATION_NAME
Default Google Cloud Search committer application name.- See Also:
-
DEFAULT_TITLE_SOURCE_FIELD
Default document title metadata source field.- See Also:
-
DEFAULT_OBJECT_TYPE_SOURCE_FIELD
Default document object type metadata source field.- See Also:
-
DEFAULT_OBJECT_TYPE
Default object type value when no metadata value is provided.- See Also:
-
DEFAULT_UPDATE_TIME_SOURCE_FIELD
Default update time metadata source field.- See Also:
-
-
Constructor Details
-
GoogleCloudSearchCommitterConfig
public GoogleCloudSearchCommitterConfig()
-
-
Method Details
-
getAclMappings
-
setAclMappings
public GoogleCloudSearchCommitterConfig setAclMappings(List<GoogleCloudSearchCommitterConfig.AclMapping> aclMappings) -
getMetadataMappings
-
setMetadataMappings
public GoogleCloudSearchCommitterConfig setMetadataMappings(List<GoogleCloudSearchCommitterConfig.MetadataMapping> metadataMappings) -
getStructuredDataMappings
-
setStructuredDataMappings
public GoogleCloudSearchCommitterConfig setStructuredDataMappings(List<GoogleCloudSearchCommitterConfig.StructuredDataMapping> structuredDataMappings) -
getSecretKeyPath
Path to the Google service account JSON key file, with access to the Cloud Search indexing API. -
getDataSourceId
The Google Cloud Search data source ID to index documents into. -
getUploadFormat
The format used to upload document content. Default isGoogleCloudSearchCommitterConfig.UploadFormat.RAW. -
getRequestMode
The priority/consistency mode sent with indexing and delete requests. Default isGoogleCloudSearchCommitterConfig.RequestMode.ASYNCHRONOUS, suited to content connectors performing full or incremental crawls. -
getApiEndpoint
Overrides the Google Cloud Search API root URL. Mainly useful for testing against a local mock server. -
getApplicationName
The application name sent to Google Cloud Search. Default is "Norconex Google Cloud Search Committer". -
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-1to keep Google client defaults. -
getHttpReadTimeoutMillis
public int getHttpReadTimeoutMillis()Optional HTTP read timeout in milliseconds applied to Google API requests. Use-1to keep Google client defaults. -
getHttpMaxRetries
public int getHttpMaxRetries()Optional HTTP retry count for Google API requests. Use-1to keep Google client defaults. -
getHttpBackoffInitialIntervalMillis
public int getHttpBackoffInitialIntervalMillis()Optional exponential backoff initial interval in milliseconds. Use-1to keep Google client defaults. -
getHttpBackoffMaxIntervalMillis
public int getHttpBackoffMaxIntervalMillis()Optional exponential backoff maximum interval in milliseconds. Use-1to keep Google client defaults. -
getHttpBackoffMaxElapsedTimeMillis
public int getHttpBackoffMaxElapsedTimeMillis()Optional exponential backoff maximum elapsed time in milliseconds. Use-1to keep Google client defaults. -
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 totrueto 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
Path to the Google service account JSON key file, with access to the Cloud Search indexing API.- Returns:
this.
-
setDataSourceId
The Google Cloud Search data source ID to index documents into.- Returns:
this.
-
setUploadFormat
public GoogleCloudSearchCommitterConfig setUploadFormat(GoogleCloudSearchCommitterConfig.UploadFormat uploadFormat) The format used to upload document content. Default isGoogleCloudSearchCommitterConfig.UploadFormat.RAW.- Returns:
this.
-
setRequestMode
public GoogleCloudSearchCommitterConfig setRequestMode(GoogleCloudSearchCommitterConfig.RequestMode requestMode) The priority/consistency mode sent with indexing and delete requests. Default isGoogleCloudSearchCommitterConfig.RequestMode.ASYNCHRONOUS, suited to content connectors performing full or incremental crawls.- Returns:
this.
-
setApiEndpoint
Overrides the Google Cloud Search API root URL. Mainly useful for testing against a local mock server.- Returns:
this.
-
setApplicationName
The application name sent to Google Cloud Search. Default is "Norconex Google Cloud Search Committer".- Returns:
this.
-
setConnectorName
The connector name sent with indexing requests. Defaults to the application name when not set.- Returns:
this.
-
setHttpConnectTimeoutMillis
Optional HTTP connect timeout in milliseconds applied to Google API requests. Use-1to keep Google client defaults.- Returns:
this.
-
setHttpReadTimeoutMillis
Optional HTTP read timeout in milliseconds applied to Google API requests. Use-1to keep Google client defaults.- Returns:
this.
-
setHttpMaxRetries
Optional HTTP retry count for Google API requests. Use-1to keep Google client defaults.- Returns:
this.
-
setHttpBackoffInitialIntervalMillis
public GoogleCloudSearchCommitterConfig setHttpBackoffInitialIntervalMillis(int httpBackoffInitialIntervalMillis) Optional exponential backoff initial interval in milliseconds. Use-1to keep Google client defaults.- Returns:
this.
-
setHttpBackoffMaxIntervalMillis
public GoogleCloudSearchCommitterConfig setHttpBackoffMaxIntervalMillis(int httpBackoffMaxIntervalMillis) Optional exponential backoff maximum interval in milliseconds. Use-1to keep Google client defaults.- Returns:
this.
-
setHttpBackoffMaxElapsedTimeMillis
public GoogleCloudSearchCommitterConfig setHttpBackoffMaxElapsedTimeMillis(int httpBackoffMaxElapsedTimeMillis) Optional exponential backoff maximum elapsed time in milliseconds. Use-1to keep Google client defaults.- Returns:
this.
-
setSourceIdField
Metadata field holding the value to use as the document unique identifier. Defaults to the document reference.- Returns:
this.
-
setKeepSourceIdField
Whether to keep the source ID field in the document metadata after it has been extracted.- Returns:
this.
-
setFailOnDeleteNotFound
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 totrueto 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
public GoogleCloudSearchCommitterConfig setAclInheritance(GoogleCloudSearchCommitterConfig.AclInheritanceMapping aclInheritance) ACL inheritance configuration, mapping a metadata field holding a parent item reference to an ACL inheritance type.- Returns:
this.
-
equals
- Overrides:
equalsin classBaseBatchCommitterConfig
-
canEqual
- Overrides:
canEqualin classBaseBatchCommitterConfig
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseBatchCommitterConfig
-
toString
- Overrides:
toStringin classBaseBatchCommitterConfig
-