Loading TOC...


   $domain-id as xs:unsignedLong,
   [$size as xs:unsignedInt?],
   [$targets as xs:unsignedLong*],
   [$forest-ids as xs:unsignedLong*],
   [$uris as xs:string*]
) as element(flexrep:results)


This function processes one or more replicated updates for the specified domain ID, ordered by oldest changes first, and returns the results.

domain-id The ID of the replicated domain.
size The maximum number of replications. If not specified, the maximum is one.
targets The IDs of the replication targets.
forest-ids The forest IDs from which to process replications. If none are specified, replications from all forests are considered.
uris The URIs of specific documents to process.


  xquery version "1.0-ml"; 

  import module namespace flexrep = "http://marklogic.com/xdmp/flexible-replication" 
      at "/MarkLogic/flexrep.xqy";

  (: Obtain the domain ID from the database used by the Master to enable CPF. :)
  let $domain := xdmp:eval(
        'xquery version "1.0-ml";
         import module namespace dom = "http://marklogic.com/cpf/domains" 
		  at "/MarkLogic/cpf/domains.xqy";
         fn:data(dom:get( "Replicated Content" )//dom:domain-id)',
         <options xmlns="xdmp:eval">

  return flexrep:process($domain) 

  (: Processes the replicated updates for the "Replicated Content" domain. :)

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