Loading TOC...

MarkLogic 10 Product Documentation
admin.getConfiguration

admin.getConfiguration() as element(configuration)

Summary

Loads the admin configuration into memory for use by other functions in the Admin module.

Required Privileges

http://marklogic.com/xdmp/privileges/admin-module-read

Usage Notes

The configuration is loaded into memory only as it is needed, so it might not contain the entire configuration at any given moment. It loads only the parts of the configuration that are needed at the time they are needed to perform other Admin module operations that specified in the XQuery request. Therefore, if you execute the function without calling any other Admin module functions, it will return the empty sequence (because it never needed any of the config information to perform any of the Admin module operations).

Example


  const admin = require('/MarkLogic/admin.xqy');
  const config = admin.getConfiguration();

  admin.databaseGetRangeElementIndexes(config, xdmp.database("Documents") )

  // returns the new configuration element -- use admin.saveConfiguration
  // to save the changes to the configuration or pass the configuration
  // to other Admin API functions to make other changes.


   

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