MarkLogic Server 11.0 Product Documentation
admin.forestRemoveReplica

admin.forestRemoveReplica(
   config as element(configuration),
   master-id as (Number|String),
   replica-id as (Number|String)
) as element(configuration)

Summary

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.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.
master-id The ID of the master forest from which to remove the replica forest (for example, xdmp.forest("MasterForest")).
replica-id The ID of the replica forest to remove from the master forest (for example, xdmp.forest("ReplicaForest")).

Required Privileges

This operation requires at least one of the following privileges:

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}

Example

  
  const admin = require('/MarkLogic/admin.xqy');
  const config = admin.getConfiguration()
  const forest = xdmp.forest("failover1")
  const 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.  
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy