[DOCS-592] shardcollection synax is incorrect Created: 09/Oct/12 Updated: 30/Oct/23 Resolved: 09/Oct/12 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | Server_Docs_20231030 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Gregor Macadam | Assignee: | Sam Kleinman (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: | |
| Days since reply: | 11 years, 19 weeks, 1 day ago |
| 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> |
| Comments |
| Comment by auto [ 09/Oct/12 ] |
|
Author: {u'date': u'2012-10-09T07:17:41-07:00', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}Message: |