Skip to content

Instantly share code, notes, and snippets.

@ableasdale
Last active December 15, 2015 06:18
Show Gist options
  • Save ableasdale/5214940 to your computer and use it in GitHub Desktop.
Save ableasdale/5214940 to your computer and use it in GitHub Desktop.
Evacuate the source-db-1 forest
(:::::::::::::: Step five - evacuate source-db-1 forest :::::::::::::::)
xquery version "1.0-ml";
xdmp:spawn(
"forest-uris-evacuate.xqy",
(xs:QName('FOREST'), xdmp:forest('source-db-1'),
xs:QName('INDEX'), -1,
xs:QName('LIMIT'), 0,
xs:QName('RESPAWN'), true()),
<options xmlns="xdmp:eval">
<database>{ xdmp:database("rebalance-me") }</database>
<root>C:\tmp\task-rebalancer-master</root>
<time-limit>3600</time-limit>
</options>)
(: Look at the database status page - you should see all documents slowly move from the source-db-1 forest and into the rebalance-me-x forests :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment