dls.documentRemoveCollections

dls.documentRemoveCollections(
   uri as String,
   collections as String[]
) as null

Summary

This function removes the named document from the specified collection.

Note that collections are not maintained in version history unless changes are also made to the content of the document.

Parameters
uri The URI of the document.
collections The collection from which to remove the document.

Required Privileges

The dls-user role is required to run this function, or the privilege:
http://marklogic.com/xdmp/privileges/dls-user

Example

// Removes 'baz.xml' from the 'foo' collection.

const dls = require('/MarkLogic/dls');

declareUpdate();
dls.documentRemoveCollections(
        '/foo/bar/baz.xml',
        'http://marklogic.com/documents/foo');
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy