Couchbase is one of the best NoSQL database. I have used this for one of the project and recently came across a scenario for which I had to do some research but straightforward solution was not available. So, I just thought of documenting various steps so that other can be benefited. So, in my scenario, I had to select some X records from one couchbase bucket and migrate them to another bucket. This was really easy. I wrote a N1QL query, added some WHERE clauses, and thats, done! All the selected records were migrated from one bucket to another. Here comes the complexity. Someone updated the requirements, and now I was asked to update the " key " of the document. I was searching, searching and searching for correct and quick solution but found that we cannot update document "key" using N1QL . So, now I had to find some work around, and this is what I came up with (someone may have better solution for this scenario): 1. Create a "tmp" bucket and ...