From 9288cf911fde094cc5c3e88bd8c26a9b431ae821 Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Tue, 4 Dec 2012 09:28:40 -0500 Subject: [PATCH 1/2] DOCS-841 add examples for usePowerOf2Sizes, remove random double quote --- source/reference/command/collMod.txt | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/source/reference/command/collMod.txt b/source/reference/command/collMod.txt index e87838fc574..42badecc10e 100644 --- a/source/reference/command/collMod.txt +++ b/source/reference/command/collMod.txt @@ -15,11 +15,11 @@ collMod .. code-block:: javascript - db.runCommand( {"collMod" : [collection] , "[flag]" : [value]" } ) + db.runCommand( {"collMod" : [collection] , "[flag]" : [value] } ) - In this command substitute ``[collection]`` with the name of the - collection, and ``[flag]`` and ``[value]`` with the flag and value - you want to set. + In this command substitute ``[collection]`` with the name of a + collection in the current database, and ``[flag]`` and ``[value]`` + with the flag and value you want to set. .. index:: document; space allocation .. index:: usePowerOf2Sizes @@ -38,6 +38,21 @@ collMod will be inserting and deleting large numbers of documents to ensure that MongoDB will effectively use space on disk. + .. example:: + + Enable :collflag:`usePowerOf2Sizes` on the collection `sensor_readings`: + + .. code-block:: javascript + + db.runCommand({collMod: "sensor_readings", usePowerOf2Sizes:true }) + + Disable :collflag:`usePowerOf2Sizes` on the collection `products`: + + .. code-block:: javascript + + db.runCommand( { collMod: "products", "usePowerOf2Sizes": false }) + + .. note:: .. versionchanged:: 2.2.1 If you're using :collflag:`usePowerOf2Sizes`, ensure @@ -51,6 +66,6 @@ collMod .. Commenting out the following after DOCS-717, it does take a lock but its to cover a very small metadata change. - + This command obtains a write lock on the affected database and will block other operations until it has completed. From 808677f7905f0fb709cf622c07f5327a66f6bd9a Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Tue, 4 Dec 2012 10:56:30 -0500 Subject: [PATCH 2/2] DOCS-841 change from [] to <> for variable portions --- source/reference/command/collMod.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/reference/command/collMod.txt b/source/reference/command/collMod.txt index 42badecc10e..b83fb44e16b 100644 --- a/source/reference/command/collMod.txt +++ b/source/reference/command/collMod.txt @@ -15,10 +15,10 @@ collMod .. code-block:: javascript - db.runCommand( {"collMod" : [collection] , "[flag]" : [value] } ) + db.runCommand( {"collMod" : , "" : } ) - In this command substitute ``[collection]`` with the name of a - collection in the current database, and ``[flag]`` and ``[value]`` + In this command substitute ```` with the name of a + collection in the current database, and ```` and ```` with the flag and value you want to set. .. index:: document; space allocation