Loading TOC...

MarkLogic Server 11.0 Product Documentation
flexrep.documentStatus

flexrep.documentStatus(
   domain-id as (Number|String),
   uri as String
) as element(flexrep.documentStatus)

Summary

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.

Example

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.
   

Required Privileges

http://marklogic.com/xdmp/privileges/flexrep-user

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.