MarkLogic Server 11.0 Product Documentation
dls.asOfQuery

dls.asOfQuery(
   when as Date
) as cts.propertiesFragmentQuery

Summary

This function returns a query that matches the most recent numbered version of documents that were created before the specified date and time.

Parameters
when The date and time before which the documents were created.

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 versions of the managed documents that were created before the
// specified date and time.

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

cts.search(dls.asOfQuery(xs.dateTime(fn.currentDateTime())));
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy