
admin:get-configuration() as element(configuration)
Loads the admin configuration into memory for use by other functions in the Admin module.
http://marklogic.com/xdmp/privileges/admin-module-read
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-get-range-element-indexes($config,
xdmp:database("Documents") )
=> The xml for any element range indexes in the "Documents"
database, for example:
<range-element-index xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://marklogic.com/xdmp/database">
<scalar-type>date</scalar-type>
<collation/>
<namespace-uri>mynamespace</namespace-uri>
<localname>myelementname</localname>
<range-value-positions>false</range-value-positions>
</range-element-index>
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.