Loading TOC...
Matches for cat:function (cat:function (cat:function/javascript (cat:function/javascript (cts:uris)))) have been highlighted. remove

MarkLogic Server 11.0 Product Documentation
cts.afterQuery

cts.afterQuery(
   timestamp as (Number|String)
) as cts.afterQuery

Summary

Returns a query matching fragments committed after a specified timestamp.

Parameters
timestamp A commit timestamp. Database fragments committed after this timestamp are matched.

Usage Notes

Fragment commit timestamps change not only by application transactions, but also by system transactions from the reindexer or the rebalancer. The query will also match fragments whose timestamps have been changed because of reindexing and rebalancing after the given timestamp.

Example

cts.uris("", null,
  cts.afterQuery(xdmp.wallclockToTimestamp(
  fn.currentDateTime().subtract(xs.dayTimeDuration("PT1H"))))
)

// => URIs of fragments committed in the last one hour

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