MongoDB WriteError “code” : 9
问题 I am trying to delete some records from MongoDB that have dirty values, but whenever I try to delete it, I am getting the writeError with code 9 . A sample of the dirty document is as follows: { "_id" : "some_unique_id_abcd", "tmp" : "1415772407377", "hiv" : "0.0", "liv" : "0.0", "oindx" : "0.0" } The remove command executed is as follows: db.myCollection.remove({"_id" : "some_unique_id_abcd"}); The following error is thrown WriteResult({ "writeError" : { "code" : 9, "errmsg" : "wrong type