Last active
May 26, 2016 16:15
-
-
Save ableasdale/683952f6ca5cdb86a5f049debbb4936e to your computer and use it in GitHub Desktop.
Reorder forests and save the configuration back to MarkLogic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; | |
let $config := admin:get-configuration() | |
let $dbid := admin:database-get-id($config, "test-db") | |
let $forests := admin:database-get-attached-forests($config,$dbid) | |
let $config := admin:database-reorder-forests($config, $dbid, ( (Forest1, Forest2,.. )) | |
(:replace above with the correct forest ordering :) | |
return admin:save-configuration($config) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment