dls.asOfQuery( when as Date ) as cts.propertiesFragmentQuery
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. |
dls-user
role is required to run
this function, or the privilege:http://marklogic.com/xdmp/privileges/dls-user
// 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())));