Autogenerated key value

Everytime i have to set key value to insert documents. Is there anyway to setup auto generated key in couchbase with Java sdk?

Hi, it is not possible directly, but what you can do easily is create a “unique key” document and use incr to get the next value and then generate your key from the returned value.