Loading TOC...

admin.saveConfigurationWithoutRestart

admin.saveConfigurationWithoutRestart(
   $config as element(configuration)
) as Sequence

Summary

This function saves a configuration specification to the cluster configuration files, without restarting MarkLogic Server. If you use this function to save any changes that require a server restart ("cold" changes such as App Server port assignment changes), then the changes will not take effect until the next time MarkLogic Server restarts (although they will be saved in the configuration). If you want MarkLogic Server to automatically restart when needed, use admin:save-configuration 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}

Usage Notes

The return value is a list of the host IDs that need to be restarted in order for the changes to take effect.

Example

  
  const admin = require('/MarkLogic/admin.xqy');
  var config = admin.getConfiguration()
  var spec = admin.forestSetEnabled(config,
    xdmp.forest("myForest"), fn.true() )
  admin.saveConfigurationWithoutRestart(spec)

  

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