Loading TOC...

MarkLogic 12 EA 1 Product Documentation
admin.forestForeignMaster

admin.forestForeignMaster(
   foreign-cluster-id as (Number|String),
   foreign-database-id as (Number|String),
   foreign-forest-id as (Number|String)
) as element(as.foreignMaster)

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

  
  const admin = require('/MarkLogic/admin.xqy');
  const cfg = admin.getConfiguration()
  const fcl = admin.clusterGetForeignClusterId(cfg, "ClusterA")
  const fdb = admin.databaseForeignMasterGetDatabaseId(
                  admin.databaseGetForeignMaster(cfg, xdmp.database("Documents")))
  admin.forestForeignMaster(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.