私のコレクションには、ドキュメントが1つしかありません。
> db.c20160712.find()
{ "_id" : ObjectId("57ab909791c3b3a393e9e277"), "Dimension_id" : 2, "Attribute" : "good", "Hour" : "20160712_06", "Frequency_count" : 100
updateOne
ドキュメントを別のドキュメントに置き換えるために実行したいと思います。しかし、なぜそこにあるのError: the update operation document must contain atomic operators
でしょうか?
> db.c20160712.updateOne( { "Attribute" : "good"}, {"Type" : "DVD", "Title" : "Matrix, The", "Released" : 1999, "Genre" : "Action"}, { upsert: true} )
2016-08-10T16:37:57.089-0400 E QUERY [thread1] Error: the update operation document must contain atomic operators :
DBCollection.prototype.updateOne@src/mongo/shell/crud_api.js:493:1
@(shell):1:1
上記のコマンドの2番目と3番目の引数は、MongoDBの決定的なガイドの例からのものです:ビッグデータを処理するための完全なガイド... Eelco Plugge、David Hows、Peter Membrey、Tim Hawkins
私のMongoDBは3.2です。