MarkLogic 9 Product Documentation
dls.documentVersionsQuery

dls.documentVersionsQuery(
   uri as String
) as cts.propertiesFragmentQuery

Summary

This function returns a query that matches any version of the specified URI. If the URI contains either of the wildcard characters '?' or '*', then the search is wildcarded. Specifying '*' matches any numbered version of any managed document.

Parameters
uri The URI of 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

  // Returns the contents of all versions of the 'baz.xml' document.

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

cts.search[fn.doc(), dls.documentVersionsQuery('/foo/bar/baz.xml.xml')];
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy