Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-841

Extra double-quote in collMod command prototype, and need for an example of setting usePowerOfSizes

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • manual
    • None

    Description

      In http://docs.mongodb.org/manual/reference/command/collMod/, there is an extra double-quote in the command prototype. Currently it is:

      db.runCommand( {"collMod" : [collection] , "[flag]" : [value]" } )

      whereas it should be:

      db.runCommand( {"collMod" : [collection] , "[flag]" : [value] } )

      That is, remove the last double-quote.

      We should also provide an example of setting, and unsetting powerOf2Sizes. That is:

      db.runCommand( {"collMod" : books , "usePowerOf2Sizes" : true } )

      It is important that we specify not to put quotes around the true or false, as that might lead someone to do this:

      db.runCommand( {"collMod" : books , "usePowerOf2Sizes" : "false" } )

      This does not do what is intended. It leaves usePowerOf2Sizes enabled. The correct syntax is:

      db.runCommand( {"collMod" : books , "usePowerOf2Sizes" : false } )

      That is, without the quotes around false.

      Attachments

        Activity

          People

            epc Ed Costello
            jantje.daniel Ian Daniel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11 years, 11 weeks, 1 day ago