
admin.forestForeignMaster( foreign-cluster-id as (Number|String), foreign-database-id as (Number|String), foreign-forest-id as (Number|String) ) as element(as.foreignMaster)
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. |
const admin = require('/MarkLogic/admin.xqy');
var cfg = admin.getConfiguration()
var fcl = admin.clusterGetForeignClusterId(cfg, "ClusterA")
var 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: Get the most useful answers to questions from the MarkLogic community, or ask your own question.