MarkLogic 12 EA 1 Product Documentation
fn:collection

fn:collection(
   [$uri as xs:string*]
) as document-node()*

Summary

Returns all of the documents that belong to the specified collection(s).

Parameters
uri The URI of the collection to retrieve. If you omit this parameter, returns all of the documents in the database. If you specify a list of URIs, returns all of the documents in all of the collections at the URIs specified in the list.

Example

fn:collection("mycollection")[1]
=> returns the first document in the "mycollection" collection
Powered by MarkLogic Server | Terms of Use | Privacy Policy