admin:database-foreign-master( $foreign-cluster-id as xs:unsignedLong, $foreign-database-id as xs:unsignedLong, $connect-forests-by-name as xs:boolean ) as element(db:foreign-master)
This function returns a master database configuration. Use the output of this function
in the admin:database-set-foreign-master
function to set the
master database configuration.
xquery version "1.0-ml"; import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; let $fdb := 476761383313557950 let $cfg := admin:get-configuration() let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA") return admin:database-foreign-master($fcl, $fdb, fn:true()) (: Returns a master database configuration element. Use the admin:database-set-foreign-master function to set the configuration. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.