Loading TOC...

MarkLogic 10 Product Documentation
admin:save-configuration

admin:save-configuration(
   $config as element(configuration)
) as empty-sequence()

Summary

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.

Required Privileges

This operation requires at least one of the following privileges:

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}

Example


  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)

  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.