admin:save-configuration( $config as element(configuration) ) as empty-sequence()
This function saves a configuration specification to
the cluster configuration files. It restarts MarkLogic
Server for "cold" administrative tasks only (for example,
for App Server port assignment changes). If you do not want
those "cold" administrative tasks to automatically restart
MarkLogic Server, use
admin:save-configuration-without-restart
instead.
Parameters | |
---|---|
config | A configuration specification, typically as returned from one of the Admin module functions. |
http://marklogic.com/xdmp/privileges/admin-module-write
http://marklogic.com/xdmp/privileges/xdmp-write-cluster-config-file
http://marklogic.com/xdmp/privileges/xdmp-write-cluster-config-file/{filename}
xquery version "1.0-ml"; import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; let $config := admin:get-configuration() let $spec := admin:forest-set-enabled($config, xdmp:forest("myForest"), fn:true() ) return admin:save-configuration($spec)