Class AmazonCloudSearchCommitter

All Implemented Interfaces:
BatchConsumer, Committer, Configurable<AmazonCloudSearchCommitterConfig>, AutoCloseable

public class AmazonCloudSearchCommitter extends AbstractBatchCommitter<AmazonCloudSearchCommitterConfig>

Commits documents to Amazon CloudSearch.

Authentication:

An access key and security key are required to connect to and interact with CloudSearch. For enhanced security, it is best to use one of the methods described in DefaultAWSCredentialsProviderChain for setting them (environment variables, system properties, profile file, etc). Do not explicitly set "accessKey" and "secretKey" on this class if you want to rely on safer methods.

CloudSearch ID limitations:

As of this writing, CloudSearch has a 128 characters length limitation on its "id" field. In addition, certain characters are not allowed. By default, an error will result from trying to submit documents with an invalid ID. You can get around this by setting AmazonCloudSearchCommitterConfig.setFixBadIds(boolean) to true. It will truncate references that are too long and append a hash code to it to keep uniqueness. It will also convert invalid characters to underscore. This approach is not 100% collision-free (uniqueness), but it should safely cover the vast majority of cases.

Author:
Pascal Essiembre