flexrep.documentStatus( domain-id as (Number|String), uri as String ) as element(flexrep.documentStatus)
This function returns the
flexrep.documentStatus
element for the
document at the
specified URI in the specified domain. The returned
flexrep.documentStatus
element is extracted from the document's properties, which remain even if the document has
been deleted.
Parameters | |
---|---|
domain-id | The ID of the replicated domain. |
uri | The URI of the document. |
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') }); flexrep.documentStatus(domain, '/content/foo.xml'); // Returns the status of the document associated with the specified URI and domain.
http://marklogic.com/xdmp/privileges/flexrep-user
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.