How should the logical type of a document get specified in CouchBase? Using a field for the type? Or employing separators in keys like
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