admin.databaseForeignReplica( foreign-cluster-id as (Number|String), foreign-database-id as (Number|String), connect-forests-by-name as Boolean, lag-limit as Number, [replication-enabled as Boolean], [queue-size as Number] ) as element(db.foreignReplica)
This function returns a replica database configuration. Use the output of
this function in the
admin.databaseSetForeignReplicas
function to place the replica database configuration into the cluster
configuration.
const admin = require('/MarkLogic/admin.xqy'); const fdb = 7746794057802787479 const cfg = admin.getConfiguration() const fcl = admin.clusterGetForeignClusterId(cfg, "ClusterA") admin.databaseForeignReplica(fcl, fdb, fn.true(), 300) //Returns the replica database configuration. Use the //admin.databaseSetForeignReplicas function to set the confirguration.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.