MarkLogic 10 Product Documentation
xdmp:forest-clear

xdmp:forest-clear(
   $forestIDs as xs:unsignedLong*
) as empty-sequence()

Summary

Clears forest data files, including all stands and journals.

If any of the forests being cleared are attached to the context database, then xdmp:forest-clear is run asynchronously, returning immediately but doing the clear in a background thread.

If the forest being cleared is not attached to the context database, it is run synchronously and will block until it returns.

The xdmp:forest-clear function is not transactional, and the best practice is to not call it in a transaction that is also doing updates.

Parameters
forestIDs The IDs of the forests to clear. If a forest has replica forests, the replicas are cleared as well.

Required Privileges

This operation requires at least one of the following privileges:

http://marklogic.com/xdmp/privileges/xdmp-forest-clear

http://marklogic.com/xdmp/privileges/xdmp-forest-clear/forest/{id}

http://marklogic.com/xdmp/privileges/xdmp-forest-clear/database/{id}

Example

xdmp:forest-clear(11183608861595735720)
Powered by MarkLogic Server | Terms of Use | Privacy Policy