Loading TOC...


   [$options as (element()|map:map)?]
) as empty-sequence()


Starts merging the forests of the database, subject to specified options.

$options The options node for this merge. The default value is () . The node for the xdmp:merge options must be in the xdmp:merge namespace.

The xdmp:merge options include:


Fragments with a timestamp of this or newer are not garbage collected during this merge. A negative value means the timestamp is relative to the time the merge starts, at ten million ticks per second. For example, -6000000000 means ten minutes before the merge. The default is 0, which means not specifying a timestamp.


The maximum allowable size, in megabytes, of a resultant stand. The default value is taken from the database configuration. A value of 0 means there is no limit. It is possible for a stand larger than the merge-max-size to merge if the stand has enough deleted fragments to trigger the merge min ratio; in this case, MarkLogic will do a single-stand merge, merging out the deleted fragments (even if the resulting stand is larger than the merge-max-size value specified).


The CPU scheduler priority for the merge ("normal" or "lower").


If any forests in the database have a single stand and this parameter is false, do not merge them. The default is true.


Specifies the IDs of the forests in which to perform merges. Each forest ID is in the <forest> child element and is of type xs:unsignedLong . The default is to merge all of the forests in the database.

Required Privileges



  xdmp:merge(<options xmlns="xdmp:merge">
   => ()

   Performs a merge on my-forest and my-other-forest.  If a stand
   created by this merge would be greater than 500 megabytes, the merge
   will be limited and not all stands will be merged (as many as can be
   merged under 500 MB will be merged).  If my-forest or my-other-forest
   have only one stand, they will not be merged.  Any fragments with
   timestamp 8273 or newer will not be garbage collected.


    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy