Details
-
Bug
-
Resolution: Done
-
Minor - P4
-
None
-
None
Description
http://docs.mongodb.org/manual/reference/command/shardCollection/
command syntax is list as
{ shardcollection: "<db>.<collection>", key: "<shardkey>" }however
key :
{ "<shardkey>" : 1 }
is correct syntax
mongos> db.runCommand(
{shardcollection: "test.bar2" , key : "key"})
{ "ok" : 0, "errmsg" : "no shard key" }mongos> db.runCommand({shardcollection: "test.bar2" , key :
{ "key": 1}})
{ "collectionsharded" : "test.bar2", "ok" : 1 }mongos>