简体   繁体   中英

Do we have any mechanism to maintain the history of the documents in Marklogic?

In my project we have a requirement where we want to maintain the history or version of documents. As if we insert the docs with same URI it replaces the old one with new one. But we want to keep the old one with version number.

How can we achieve this in Marklogic?

MarkLogic has two features that might suit your needs: document library services and bitemporal.

From the Understanding Library Services :

The Library Services enable you to create and maintain versions of managed documents in MarkLogic Server. Access to managed documents is controlled using a check-out/check-in model. ... When you initially put a document under Library Services management, it creates Version 1 of the document. Each time you update the document, a new version of the document is created. Old versions of the updated document are retained according to your retention policy, as described in Defining a Retention Policy.

And from Understanding Temporal Documents :

You can configure MarkLogic Server to manage and query bi-temporal data. Bi-temporal documents are associated with both a valid time that marks when a thing is known in the real world and a system time that marks when the thing is available for discovery in MarkLogic Server.

Bi-temporal data is necessary whenever there is a requirement to maintain snapshots of a transaction across various time dimensions. For example, financial and insurance industries use bitemporal data to track changes to contracts, policies, and events in a manner that adheres to strict regulation and compliance requirements.


@grtjn points out that as of MarkLogic 9, you can also store Uni-temporal documents .

A uni-temporal collection is configured to store temporal documents that only a system time axes. You can create a temporal collection to store system axes in one of two ways:

  • The system axes in metadata.
  • The system axes in the document.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM