MarkLogic 12 EA 1 Product Documentation
xdmp.forestClear

xdmp.forestClear(
   forestIDs as (Number|String)[]
) as null

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.forestClear 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.forestClear 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.forestClear(11183608861595735720)
Powered by MarkLogic Server | Terms of Use | Privacy Policy