MarkLogic Server 11.0 Product Documentation
xdmp.documentGetCollections

xdmp.documentGetCollections(
   uri as String
) as String[]

Summary

Returns the collections to which a given document belongs.

Parameters
uri The document URI.

Usage Notes

If the URI passed in doesn't exist, an empty array is returned.

Example

xdmp.documentGetCollections("chapter5.json")
=> ["http://marklogic.com/all-books",
        "http://marklogic.com/xml-books"]
Powered by MarkLogic Server | Terms of Use | Privacy Policy