Below is a query that removes a key from the root of the document:
r.table('foo').get(document_id).replace(r.row.without('key'))
You can also do it for multiple documents as follows:
r.table('foo').filter(condition).replace(r.row.without('key'))
As of the upcoming 1.8 release, you will also be able to do it for nested keys as follows:
r.table('foo').get(document_id).replace(r.row.without({data: { key1: true}}))
Currently, the commands above essentially replace the document with the copy of itself without the relevant keys on the server. In the next few releases this will be heavily optimized to minimize document copying in memory (so while it looks like you're replacing the document with a copy of itself without a key, under the hood the operation will be performed destructively without any copying). Future releases might update the underlying structure so that the full document won't have to be written to disk.
If you use the without
command, you won't have to do anything to take advantage of these optimizations (other than upgrading the server).
Hope this helps.