
admin.forestRemoveReplica( config as element(configuration), master-id as (Number|String), replica-id as (Number|String) ) as element(configuration)
This function removes a forest replica from a master forest. Note that removing a replica forest will take the master forest offline for a period ranging between a few seconds to a few minutes.
http://marklogic.com/xdmp/privileges/admin/database
http://marklogic.com/xdmp/privileges/admin/database/{id}
http://marklogic.com/xdmp/privileges/admin/forest
http://marklogic.com/xdmp/privileges/admin/forest/{id}
const admin = require('/MarkLogic/admin.xqy');
var config = admin.getConfiguration()
var forest = xdmp.forest("failover1")
var replicaForest = xdmp.forest("replica1")
admin.forestRemoveReplica(config, forest, replicaForest)
//returns the new configuration element --
//use admin.saveConfiguration to save the changes to the
//configuration or pass the configuration to other
//Admin API functions to make other changes.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.