Class GoogleCloudSearchCommitter
- All Implemented Interfaces:
BatchConsumer,Committer,Configurable<GoogleCloudSearchCommitterConfig>,AutoCloseable
Commits documents to Google Cloud Search using the official Google API client. The client root URL is configurable, which makes it possible to run the committer against a local mock server during development and tests.
Raw vs text upload
Text uploads use the committer request content (the parsed/extracted
plain text). Raw uploads instead send the original, unparsed document
content, which must be captured ahead of time (since parsing normally
discards it) into the
"binaryContent" metadata field
— e.g., using a BinaryContentTransformer pre-parse handler.
ACL mapping
Metadata fields can optionally be mapped to Google Cloud Search ACL
principals (readers, denied readers, owners) via
GoogleCloudSearchCommitterConfig.setAclMappings(java.util.List),
and ACL inheritance from a parent item can be configured via
GoogleCloudSearchCommitterConfig.setAclInheritance(GoogleCloudSearchCommitterConfig.AclInheritanceMapping).
-
Field Summary
Fields inherited from interface com.norconex.commons.lang.config.Configurable
PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected voidSubclasses can perform additional closing logic by overriding this method.protected voidCommits the supplied batch.booleaninthashCode()protected voidSubclasses can perform additional initialization by overriding this method.toString()Methods inherited from class com.norconex.committer.core.batch.AbstractBatchCommitter
consume, doClean, doClose, doDelete, doInit, doUpsert, getInitializedQueueMethods inherited from class com.norconex.committer.core.AbstractCommitter
accept, applyFieldMappings, clean, close, delete, fireDebug, fireDebug, fireError, fireError, fireInfo, fireInfo, getCommitterContext, init, upsert
-
Constructor Details
-
GoogleCloudSearchCommitter
public GoogleCloudSearchCommitter()
-
-
Method Details
-
initBatchCommitter
Description copied from class:AbstractBatchCommitterSubclasses can perform additional initialization by overriding this method. Default implementation does nothing. The committer context and committer queue will be already initialized when invokingAbstractCommitter.getCommitterContext()andAbstractBatchCommitter.getInitializedQueue(), respectively.- Overrides:
initBatchCommitterin classAbstractBatchCommitter<GoogleCloudSearchCommitterConfig>- Throws:
CommitterException- error initializing
-
commitBatch
Description copied from class:AbstractBatchCommitterCommits the supplied batch.- Specified by:
commitBatchin classAbstractBatchCommitter<GoogleCloudSearchCommitterConfig>- Parameters:
it- the batch to commit- Throws:
CommitterException- could not commit the batch
-
closeBatchCommitter
Description copied from class:AbstractBatchCommitterSubclasses can perform additional closing logic by overriding this method. Default implementation does nothing.- Overrides:
closeBatchCommitterin classAbstractBatchCommitter<GoogleCloudSearchCommitterConfig>- Throws:
CommitterException- error closing committer
-
equals
- Overrides:
equalsin classAbstractBatchCommitter<GoogleCloudSearchCommitterConfig>
-
canEqual
- Overrides:
canEqualin classAbstractBatchCommitter<GoogleCloudSearchCommitterConfig>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractBatchCommitter<GoogleCloudSearchCommitterConfig>
-
toString
- Overrides:
toStringin classAbstractBatchCommitter<GoogleCloudSearchCommitterConfig>
-
getConfiguration
-