Following the syntax they use here by setting an existing id and wrapping the change in a {"doc": { ... }} object just replaces the existing document with a doc object now
{"doc": { ... }}
doc