admin.saveConfiguration( config as element(configuration) ) as null
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}
const admin = require('/MarkLogic/admin.xqy'); const config = admin.getConfiguration() const spec = admin.forestSetEnabled(config, xdmp.forest("myForest"), fn.true() ) admin.saveConfiguration(spec)