public class IdolCommitter extends AbstractMappedCommitter
Commits documents to HP Autonomy IDOL Server/DIH or HP Autonomy Connector Framework Server (CFS). Specifying either the index port or the cfs port determines which of the two will be the documents target.
As of 2.1.1, XML configuration entries expecting millisecond durations
can be provided in human-readable format (English only), as per
DurationParser
(e.g., "5 minutes and 30 seconds" or "5m30s").
<committer class="com.norconex.committer.idol.IdolCommitter"> <!-- To commit documents to IDOL or DIH: --> <host>(IDOL/DIH host name or IP)</host> <indexPort>(IDOL/DIH index port)</indexPort> <databaseName>(Optional IDOL Database Name where to store documents)</databaseName> <dreAddDataParams> <param name="(parameter name)">(parameter value)</param> </dreAddDataParams> <dreDeleteRefParams> <param name="(parameter name)">(parameter value)</param> </dreDeleteRefParams> <!-- To commit documents to CFS: --> <host>(CFS host name or IP)</host> <cfsPort>(CFS Server/Ingest port)</cfsPort> <!-- Common settings: --> <sourceReferenceField keep="[false|true]"> (Optional name of field that contains the document reference, when the default document reference is not used. The reference value will be mapped to the IDOL "DREREFERENCE" field, or the "targetReferenceField" specified. Once re-mapped, this metadata source field is deleted, unless "keep" is set totrue
.) </sourceReferenceField> <targetReferenceField> (Optional name of IDOL target field where to store the source reference. If not specified, default is "DREREFERENCE".) </targetReferenceField> <sourceContentField keep="[false|true]"> (If you wish to use a metadata field to act as the document "content", you can specify that field here. Default does not take a metadata field but rather the document content. Once re-mapped, the metadata source field is deleted, unless "keep" is set totrue
.) </sourceContentField> <targetContentField> (IDOL target field name for a document content/body. Default is: DRECONTENT) </targetContentField> <commitBatchSize> (max number of docs to send IDOL at once) </commitBatchSize> <queueDir>(optional path where to queue files)</queueDir> <queueSize>(max queue size before committing)</queueSize> <maxRetries>(max retries upon commit failures)</maxRetries> <maxRetryWait>(max delay in milliseconds between retries)</maxRetryWait> </committer>
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_IDOL_CONTENT_FIELD
Default field for content in Autonomy Idol Database.
|
static String |
DEFAULT_IDOL_REFERENCE_FIELD
Default key field in Autonomy Idol database.
|
DEFAULT_COMMIT_BATCH_SIZE
DEFAULT_QUEUE_DIR, filesCommitting
DEFAULT_QUEUE_SIZE, queueSize
Constructor and Description |
---|
IdolCommitter()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addDreAddDataParam(String name,
String value)
Adds a DREADDDATA URL parameter.
|
void |
addDreDeleteRefParam(String name,
String value)
Adds the DREDELETEREF URL parameter value for the parameter name.
|
protected void |
buildCfsXmlDocument(XMLStreamWriter writer,
InputStream is,
Properties properties) |
protected String |
buildIdxDocument(InputStream is,
Properties properties)
Build an idol document using the idx file format
|
protected void |
commitBatch(List<ICommitOperation> batch) |
void |
dreAddData(List<IAddOperation> addOperations)
Commits the addition operations.
|
void |
dreDeleteRef(List<IDeleteOperation> deleteOperations)
Commits the deletion operations
|
int |
getCfsPort()
Gets CFS port.
|
String |
getDatabaseName()
Gets IDOL database name.
|
String |
getDreAddDataParam(String name)
Gets the DREADDDATA URL parameter value for the parameter name.
|
Set<String> |
getDreAddDataParamNames()
Gets all DREADDDATA URL parameter names
|
String |
getDreDeleteRefParam(String name)
Gets the DREDELETEREF URL parameter value for the parameter name.
|
Set<String> |
getDreDeleteRefParamNames()
Gets all DREDELETEREF URL parameter names
|
String |
getHost()
Sets IDOL host name.
|
int |
getIndexPort()
Gets IDOL index port.
|
protected void |
loadFromXml(XMLConfiguration xml) |
protected void |
saveToXML(XMLStreamWriter writer) |
void |
setCfsPort(int cfsPort)
Sets CFS port.
|
void |
setDatabaseName(String databaseName)
Sets IDOL database name.
|
void |
setHost(String host)
Gets IDOL host name.
|
void |
setIndexPort(int indexPort)
Sets IDOL index port.
|
void |
sync()
Perform a DRESYNC / Commit on the idol Database.
|
equals, getSourceContentField, getSourceReferenceField, getTargetContentField, getTargetReferenceField, hashCode, isKeepSourceContentField, isKeepSourceReferenceField, loadFromXML, prepareCommitAddition, saveToXML, setKeepSourceContentField, setKeepSourceReferenceField, setSourceContentField, setSourceReferenceField, setTargetContentField, setTargetReferenceField, toString
commitAddition, commitComplete, commitDeletion, getCommitBatchSize, getMaxRetries, getMaxRetryWait, setCommitBatchSize, setMaxRetries, setMaxRetryWait
commit, getInitialQueueDocCount, getQueueDir, prepareCommitDeletion, queueAddition, queueRemoval, setQueueDir
add, getQueueSize, remove, setQueueSize
public static final String DEFAULT_IDOL_REFERENCE_FIELD
public static final String DEFAULT_IDOL_CONTENT_FIELD
public int getCfsPort()
public void setCfsPort(int cfsPort)
cfsPort
- CFS portpublic int getIndexPort()
public void setIndexPort(int indexPort)
indexPort
- IDOL index portpublic String getDatabaseName()
public void setDatabaseName(String databaseName)
databaseName
- IDOL database namepublic String getHost()
public void setHost(String host)
host
- IDOL host namepublic String getDreAddDataParam(String name)
name
- parameter namepublic void addDreAddDataParam(String name, String value)
name
- parameter namevalue
- parameter valuepublic String getDreDeleteRefParam(String name)
name
- parameter namepublic void addDreDeleteRefParam(String name, String value)
name
- parameter namevalue
- parameter valuepublic Set<String> getDreAddDataParamNames()
public Set<String> getDreDeleteRefParamNames()
protected void commitBatch(List<ICommitOperation> batch)
commitBatch
in class AbstractBatchCommitter
protected void loadFromXml(XMLConfiguration xml)
loadFromXml
in class AbstractMappedCommitter
protected void saveToXML(XMLStreamWriter writer) throws XMLStreamException
saveToXML
in class AbstractMappedCommitter
XMLStreamException
protected String buildIdxDocument(InputStream is, Properties properties)
is
- input streamproperties
- propertiespublic void dreAddData(List<IAddOperation> addOperations)
addOperations
- additionspublic void dreDeleteRef(List<IDeleteOperation> deleteOperations)
deleteOperations
- deletionspublic void sync()
protected void buildCfsXmlDocument(XMLStreamWriter writer, InputStream is, Properties properties) throws XMLStreamException, IOException
XMLStreamException
IOException
Copyright © 2013–2021 Norconex Inc.. All rights reserved.