[DOCS-868] example for shard collection command is incorrect Created: 10/Dec/12  Updated: 10/Dec/12  Resolved: 10/Dec/12

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Michael O'Brien 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, 10 weeks, 2 days ago

 Description   

Error on this page:
http://docs.mongodb.org/manual/administration/sharding/#set-up-a-sharded-cluster

It says:

 To shard a collection, run the shardCollection command or the sh.shardCollection() shell helper.
 
db.runCommand( { shardCollection: "<database>.<collection>", key: "<shard-key>" } )

This actually doesn't work though. The syntax must be key:

{ "shardkey": 1 }

 Comments   
Comment by auto [ 10/Dec/12 ]

Author:

{u'date': u'2012-12-10T23:54:15Z', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}

Message: DOCS-868: clarification of shard key specification
Branch: master
https://github.com/mongodb/docs/commit/276f7de9c22fe19922eef67c83e25e26afe9dde2

Comment by auto [ 10/Dec/12 ]

Author:

{u'date': u'2012-12-10T20:11:59Z', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-868: correcting example command
Branch: master
https://github.com/mongodb/docs/commit/76998ad427cf8875256c37bb102e74b1c0e27b37

Generated at Thu Feb 08 07:39:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.