Loading TOC...

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')];
   

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