
admin.databaseForeignMaster( foreign-cluster-id as (Number|String), foreign-database-id as (Number|String), connect-forests-by-name as Boolean ) as element(db.foreignMaster)
    This function returns a master database configuration.  Use the output of this function
    in the 
    admin.databaseSetForeignMaster function to set the
    master database configuration.
  
  
  const admin = require('/MarkLogic/admin.xqy');
  const fdb = 476761383313557950
  const cfg = admin.getConfiguration()
  const fcl = admin.clusterGetForeignClusterId(cfg, "ClusterA")
  admin.databaseForeignMaster(fcl, fdb, fn.true())
   //Returns a master database configuration element.//Use the
   //admin.databaseSetForeignMaster function to set the
   //configuration. 
    
  
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.