admin.forestForeignReplica( foreign-cluster-id as (Number|String), foreign-database-id as (Number|String), foreign-forest-id as (Number|String) ) as element(as.foreignReplica)
This function returns a replica forest configuration. Use the output of this
function in the admin:forest-set-foreign-replicas
function to
place the replica forest configuration into the cluster configuration. This
function must be executed on the master host.
Parameters | |
---|---|
foreign-cluster-id | The ID of the foreign cluster containing the replica host. |
foreign-database-id | The ID of the replica database. |
foreign-forest-id | The ID of the foreign forest. |
const admin = require('/MarkLogic/admin.xqy'); const cfg = admin.getConfiguration() const fcl = admin.clusterGetForeignClusterId(cfg, "ClusterA") const fdb = admin.databaseForeignReplicaGetDatabaseId( admin.databaseGetForeignReplicas(cfg, xdmp.database("Documents"))) admin.forestForeignReplica(fcl, fdb , 2331251018938912591) //Returns a replica forest configuration for the master 'Documents' forest.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.