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:database-set-foreign-master
function to set the
master database configuration.
const admin = require('/MarkLogic/admin.xqy'); var fdb = 476761383313557950 var cfg = admin.getConfiguration() var 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.