The Logical Type of The Document in CouchBase
1
vote
1
answer
193
views
How should the logical type of a document get specified in CouchBase? Using a field for the type? Or employing separators in keys like
product::app::123id
?
Currently I'm putting a document type, inside the document itself, inside a string field named Type like say Product.
But I see this pattern of using separators in document id, like product::app::123id
. Done some playing around it, couldn't get the type part (product) from the key (Of-course parsing it, by splitting is possible, which to me seems to have same overhead in both N1QL and views).
So how should the document type (app logic type) get specified?
Env: CouchBase Community, inside Docker on Ubuntu 14.04, using Go client gocb
.
Asked by Kaveh Shahbazian
(113 rep)
Feb 7, 2017, 01:41 PM
Last activity: Feb 7, 2017, 02:22 PM
Last activity: Feb 7, 2017, 02:22 PM