Perhaps I’ve missed it, but is there the ability to define a “Business” Primary Key, (not ino:id) which uniquely identifies a document? I’m sure one can add an attribute as a user-defined primary key, but I’d like to be able to enforce uniqueness within Tamino, and have it return a “Document already exists” error when adding a Document with a Primary Key that is already stored in Tamono.
At the moment there is no concept of a primary key within Tamino; you can define an element within a schema as a standard index but this does not guarantee uniqueness.
I thought about implementing this from an application - say by querying for this value and if there are no resulting documents it is safe to store. If there is a document then the store could be rejected. This will probably work until two clients try to insert at the same time - both will query and get no document found so both will store and this isn’t really what you want. Of course you can work around this by additional coding but this starts to become a complex solution.