Reputation: 8422
I’m interested in using the uni-temporal feature with binary documents. I found this note in the documentation:
You can only import a binary document as a temporal document if the temporal collection is uni-temporal and the system time axis is stored in the metadata.
That reference is in a section that is talking about MLCP specifically.
I have a couple questions that are related, so hopefully it's okay to put them together.
Upvotes: 1
Views: 77
Reputation: 20414
The temporal timestamps must be either in hidden metadata fields, or inside the document fragment. That is independent of the way you insert the document, MLCP as well as REST API both use temporal:document-insert
behind the scene. The temporal:document-insert
will scan the document fragment and metadata that you provide in that call for appropriate placeholders for the system time. Properties are not included in that evaluation. The insert function would simply throw an XDMP-NOMATCH if you'd try.
Since binaries cannot hold timestamp values in an indexable way in the document fragment, and properties are not temporally protected, they must be put in hidden metadata fields.
To create a temporal axis on a hidden metadata field, you create a field of the type 'metadata', and you put a field range index on that. You then refer to that field range index when creating your axis.
HTH!
Upvotes: 1