
flexrep:process( $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.
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">
<database>{xdmp:database("MyTriggers")}</database>
</options>)
return flexrep:process($domain)
(: Processes the replicated updates for the "Replicated Content" domain. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.