MarkLogic 10 and Data Hub 5.0

Latest MarkLogic releases provide a smarter, simpler, and more secure way to integrate data.

Read Blog →


Stay On Top Of Everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up →

Temporal documents—finding all versions
11 February 2015 01:58 PM


How do you find all versions of a temporal document?


In MarkLogic Server, a temporal document is managed as a series of versioned documents in a protected temporal collection. In addition, each temporal document added creates another collection based on its URI, and all versions of the document will be in that collection.

For example, if you have stored a temporal document at URI /orders/koolorder.xml then you can find all the versions of that document by using a collection query as

    cts:search (/, cts:collection-query ('/orders/koolorder.xml'))

and the uris of all the versions of the document as

    cts:uris ((), (), cts:collection-query ('/orders/koolorder.xml'))

(4 vote(s))
Not helpful

Comments (0)