Skip to content

Commit aad21f2

Browse files
author
Ed Costello
committed
standardize casing of shardCollection
1 parent 9fd46d9 commit aad21f2

8 files changed

+17
-17
lines changed

source/reference/command/shardCollection.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ shardCollection
1313

1414
.. code-block:: javascript
1515

16-
{ shardcollection: "<db>.<collection>", key: { "<shardkey>": 1 } }
16+
{ shardCollection: "<db>.<collection>", key: { "<shardkey>": 1 } }
1717

1818
This enables sharding for the collection specified by
1919
``<collection>`` in the database named ``<db>``, using the key
@@ -28,7 +28,7 @@ shardCollection
2828

2929
.. warning::
3030

31-
There's no easy way to disable sharding after running :dbcommand:`shardcollection`. In addition,
31+
There's no easy way to disable sharding after running :dbcommand:`shardCollection`. In addition,
3232
you cannot change shard keys once set. If you must convert a sharded cluster to a :term:`standalone`
3333
node or :term:`replica set`, you must make a single backup of the entire cluster
3434
and then restore the backup to the standalone :program:`mongod`

source/tutorial/convert-replica-set-to-replicated-shard-cluster.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ Issue the following command:
376376
.. code-block:: javascript
377377

378378
use admin
379-
db.runCommand( { shardcollection : "test.test_collection", key : {"number":1} })
379+
db.runCommand( { shardCollection : "test.test_collection", key : {"number":1} })
380380
{ "collectionsharded" : "test.test_collection", "ok" : 1 }
381381

382382
The collection ``test_collection`` is now sharded!

source/tutorial/enforce-unique-keys-for-sharded-collections.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ using the ``unique`` constraint, specify the :dbcommand:`shardCollection` comman
6262

6363
.. code-block:: javascript
6464

65-
db.runCommand( { shardcollection : "test.users" , key : { email : 1 } , unique : true } );
65+
db.runCommand( { shardCollection : "test.users" , key : { email : 1 } , unique : true } );
6666

6767
Remember that the ``_id`` field index is always unique. By default, MongoDB
6868
inserts an ``ObjectId`` into the ``_id`` field. However,

source/use-cases/category-hierarchy.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ following operation in the Python/PyMongo console.
262262

263263
.. code-block:: python
264264

265-
>>> db.command('shardcollection', 'categories', {
265+
>>> db.command('shardCollection', 'categories', {
266266
... 'key': {'_id': 1} })
267267
{ "collectionsharded" : "categories", "ok" : 1 }
268268

source/use-cases/hierarchical-aggregation.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ timestamp) on the events collection. Consider the following:
468468

469469
.. code-block:: pycon
470470

471-
>>> db.command('shardcollection','events', {
471+
>>> db.command('shardCollection','events', {
472472
... 'key' : { 'userid': 1, 'ts' : 1} } )
473473
{ "collectionsharded": "events", "ok" : 1 }
474474

@@ -477,13 +477,13 @@ issue the following group of shard operations in the Python/PyMongo shell:
477477

478478
.. code-block:: python
479479

480-
db.command('shardcollection', 'stats.daily', {
480+
db.command('shardCollection', 'stats.daily', {
481481
'key': { '_id': 1 } })
482-
db.command('shardcollection', 'stats.weekly', {
482+
db.command('shardCollection', 'stats.weekly', {
483483
'key': { '_id': 1 } })
484-
db.command('shardcollection', 'stats.monthly', {
484+
db.command('shardCollection', 'stats.monthly', {
485485
'key': { '_id': 1 } })
486-
db.command('shardcollection', 'stats.yearly', {
486+
db.command('shardCollection', 'stats.yearly', {
487487
'key': { '_id': 1 } })
488488

489489
You should also update the ``h_aggregate`` map-reduce wrapper to

source/use-cases/inventory-management.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,9 @@ cart and inventory collections:
454454

455455
.. code-block:: pycon
456456

457-
>>> db.command('shardcollection', 'inventory'
457+
>>> db.command('shardCollection', 'inventory'
458458
... 'key': { '_id': 1 } )
459459
{ "collectionsharded" : "inventory", "ok" : 1 }
460-
>>> db.command('shardcollection', 'cart')
460+
>>> db.command('shardCollection', 'cart')
461461
... 'key': { '_id': 1 } )
462462
{ "collectionsharded" : "cart", "ok" : 1 }

source/use-cases/metadata-and-asset-management.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,10 +471,10 @@ Use the following operation at the Python/PyMongo shell:
471471

472472
.. code-block:: pycon
473473

474-
>>> db.command('shardcollection', 'cms.nodes', {
474+
>>> db.command('shardCollection', 'cms.nodes', {
475475
... key : { 'metadata.section': 1, 'metadata.slug' : 1 } })
476476
{ "collectionsharded": "cms.nodes", "ok": 1}
477-
>>> db.command('shardcollection', 'cms.assets.files', {
477+
>>> db.command('shardCollection', 'cms.assets.files', {
478478
... key : { 'metadata.section': 1, 'metadata.slug' : 1 } })
479479
{ "collectionsharded": "cms.assets.files", "ok": 1}
480480

@@ -484,7 +484,7 @@ shard the collection
484484

485485
.. code-block:: pycon
486486

487-
>>> db.command('shardcollection', 'cms.assets.chunks', {
487+
>>> db.command('shardCollection', 'cms.assets.chunks', {
488488
... key : { 'files_id': 1 } })
489489
{ "collectionsharded": "cms.assets.chunks", "ok": 1}
490490

source/use-cases/storing-comments.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ at the Python/PyMongo console:
700700

701701
.. code-block:: pycon
702702

703-
>>> db.command('shardcollection', 'comments', {
703+
>>> db.command('shardCollection', 'comments', {
704704
... 'key' : { 'discussion_id' : 1, 'full_slug': 1 } })
705705

706706
This will return the following response:
@@ -721,7 +721,7 @@ at the Python/PyMongo console:
721721

722722
.. code-block:: python
723723

724-
>>> db.command('shardcollection', 'comment_pages', {
724+
>>> db.command('shardCollection', 'comment_pages', {
725725
... key : { 'discussion_id' : 1, 'page': 1 } })
726726
{ "collectionsharded" : "comment_pages", "ok" : 1 }
727727

0 commit comments

Comments
 (0)