What is the difference in creating a system axes in a metadata with that of creating system axes in document in MarkLogic

20 views Asked by At

I want to understand the difference of creating a system axes in a metadata with that of creating system axes in document in MarkLogic.

I have followed this link and I have executed as it instructs but I cannot understand the difference as nothing changes in the way it represents the files under the database.

System axes in a document - As per my understanding I thought it would take a field from the document and update that with the transaction time. Can this be achieved anyway ?

1

There are 1 answers

0
Mads Hansen On BEST ANSWER

https://docs.marklogic.com/guide/temporal/managing#id_59302

Unlike when the system axes is stored in metadata, you must include the system start and end elements or properties when they are stored in the temporal document. They can either be null or include a timestamp, which will be reset by MarkLogic.

https://docs.marklogic.com/guide/temporal/managing#id_38470

As described in Bi-temporal Collections, the bi-temporal document being inserted or updated must specify valid start and end times either in the document or in metadata. When the system start and end times are stored in the document, they also must be included. These times must be dateTime values identified by elements that map to the range indexes that represent the valid start and end time period. On insert, MarkLogic sets the system start time to the current time system time and the system end time to the farthest possible time (infinity).

If you have enabled LSQT, as described in Last Stable Query Time (LSQT) and Application-controlled System Time, you can alternatively have your application call the temporal:statement-set-system-time function to specify a system start time along with your insert. The dateTime given must be later than the LSQT returned by the temporal:get-lsqt function.