Loading TOC...

MarkLogic 12 EA 1 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"]

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.