Loading TOC...

MarkLogic 9 Product Documentation
admin:forest-foreign-master

admin:forest-foreign-master(
   $foreign-cluster-id as xs:unsignedLong,
   $foreign-database-id as xs:unsignedLong,
   $foreign-forest-id as xs:unsignedLong
) as element(as:foreign-master)

Summary

This function creates a replication configuration element for the specified master forest. This function must be executed on the replica cluster.

Parameters
foreign-cluster-id The ID of the master cluster.
foreign-database-id The ID of the master database.
foreign-forest-id The ID of the master forest.

Example


  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin"
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  let $fdb := admin:database-foreign-master-get-database-id(
                  admin:database-get-foreign-master($cfg, xdmp:database("Documents")))

  return admin:forest-foreign-master($fcl, $fdb , 3017132713745743620)

  (: Returns a configuration element for the foreign master forest. :)
    

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