Loading TOC...

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())));
   

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