Details
-
Task
-
Resolution: Done
-
Major - P3
-
None
-
None
Description
e.g.
mongos> sh.shardCollection("test.collection",{_id:"hashed"}) |
{ "collectionsharded" : "test.collection", "ok" : 1 } |
mongos> db.collection.update({},{$set:{a:1}},{upsert:false,multi:false}) |
For non-multi updates, must have _id or full shard key ({ _id: "hashed" }) in query |
mongos> db.collection.update({},{$set:{a:1}},{upsert:true,multi:true}) |
can't upsert something without full valid shard key : {}
|
mongos> db.collection.remove({},true) |
can only delete with a non-shard key pattern if can delete as many as we find : {} |
mongos>
|