<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.forestClear.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.forestClear</api:function-name><api:suggest>xdmp.forestclear</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>forestclear</api:suggest><api:function-link mode="xquery" fullname="xdmp:forest-clear">/apidoc/8.0/xdmp:forest-clear.xml</api:function-link><api:function mode="javascript" name="forestClear" type="builtin" lib="xdmp" category="AdminBuiltins" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.forestClear"><api:summary>
  Clears forest data files, including all stands and journals.
  <p xmlns="http://www.w3.org/1999/xhtml">If any of the forests being cleared are attached to the context database, 
  then <code>xdmp:forest-clear</code> is run asynchronously, returning 
  immediately but doing the clear in a background thread. </p>
  <p xmlns="http://www.w3.org/1999/xhtml">If the forest being cleared is not attached to the context database, it 
  is run synchronously and will block until it returns. </p>
  <p xmlns="http://www.w3.org/1999/xhtml">The <code>xdmp:forest-clear</code> function is not transactional, and 
  the best practice is to not call it in a transaction that is also doing 
  updates.</p>
</api:summary><api:params><api:param name="forestIDs" type="xs:unsignedLong*"><api:param-description>
    The IDs of the forests to clear. If a forest has replica forests, the
    replicas are cleared as well.
  </api:param-description><api:param-name>forestIDs</api:param-name><api:param-type>String[]</api:param-type></api:param></api:params><api:return>null</api:return><api:privilege>
  <p xmlns="http://www.w3.org/1999/xhtml"><code>http://marklogic.com/xdmp/privileges/xdmp-forest-clear</code></p>
</api:privilege><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.forestClear(11183608861595735720)
</pre></api:example></api:function></api:function-page>