flexrep.targetErrorDocuments( domain-id as (Number|String), target-ids as (Number|String)[] ) as Sequence
This function returns status information for documents that failed to replicate for the specified domain and targets. The sequence of status elements returned is ordered in reverse chronological order of the last time replication was attempted for the document.
Parameters | |
---|---|
domain-id | The ID of the replicated domain. |
target-ids | The ID of the replication target. |
const flexrep = require('/MarkLogic/flexrep'); // Obtain the domain ID from the database used by the Master to enable CPF. const domain = xdmp.eval( 'const dom = require("/MarkLogic/cpf/domains");' + 'fn.data(dom.get("Default Master").xpath("//dom:domain-id"));', null, { 'database' : xdmp.database('Triggers') }); let cfg = flexrep.configurationGet(domain, true); let targetId = flexrep.configurationTargetGetId(cfg, "Replica"); flexrep.targetErrorDocuments(domain, (targetId)); // Returns the status of the documents in the "Replicated Content" domain // that failed to replicate to the "Replica" target.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.