Hi,
Are document ids, as referenced by META().id in N1QL, unique by cluster or by buckets? I.e. if there are two buckets on the same cluster, is it possible in theory for documents in different buckets to have the same document ID?
Thanks.
Hi,
Are document ids, as referenced by META().id in N1QL, unique by cluster or by buckets? I.e. if there are two buckets on the same cluster, is it possible in theory for documents in different buckets to have the same document ID?
Thanks.
DocumentIds are unique by bucket.
A seperate, but related question :
Is it possible to guarantee that document IDs won’t ever change, even after an upgrades/failures?
I would like to use document IDs as a kind of universal ID method, but that might be problematic if they could ever change, even in fringe cases.
Yup, the document ID is the unique identifier for the document - sort of like the primary key in RDBMS.
It’s not going to change during upgrades or failures by itself.
Many thanks for your quick replies!