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

Introduction

How do you find all versions of a temporal document?

Details

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))
Helpful
Not helpful

Comments (0)