You will need to add set or add to the field and remove the rest of the fields. You need id and the fields.
var doc = {
"id" : "872919092",
filename : {"set" : "history_book"},
topic : {"add" : "mughal"}
}
client.add(doc)
Also note that you can increment or decrement int's using inc or dec