Rolling Back a Forest to a Point In Time
You can use the xdmp:forest-rollback
function to roll the state of one or more forests back to a specified system timestamp. To roll forest(s) back to an earlier timestamp, you must first set the merge timestamp to keep deleted fragments from that specified timestamp. For details on rolling back a forest, including the procedure to perform a rollback, see Rolling Back a Forest to a Particular Timestamp in the Application Developer’s Guide and the xdmp:forest-rollback
API documentation in the in the MarkLogic documents for Server-Side XQuery APIs.