Solutions

MarkLogic Data Hub Service

Fast data integration + improved data governance and security, with no infrastructure to buy or manage.

Learn More

Learn

Stay On Top Of Everything MarkLogic

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

Sign Me Up

Community

Stay On Top Of Everything MarkLogic

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

Sign Me Up

Company

Stay On Top Of Everything MarkLogic

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

Sign Me Up

 
Knowledgebase:
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'))

(2 vote(s))
Helpful
Not helpful

Comments (0)