admin:forest-remove-replica( $config as element(configuration), $master-id as xs:unsignedLong, $replica-id as xs:unsignedLong ) 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}
xquery version "1.0-ml"; import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; let $config := admin:get-configuration() let $forest := xdmp:forest("failover1") let $replica-forest := xdmp:forest("replica1") return admin:forest-remove-replica($config, $forest, $replica-forest) (: returns the new configuration element -- use admin:save-configuration to save the changes to the configuration or pass the configuration to other Admin API functions to make other changes. :)