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

Shell helper sh.shardCollection() takes options parameter

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • Affects Version/s: None
    • Component/s: Server
    • Labels:
      None

      In 3.4, the shell helper sh.shardCollection() takes an additional parameter options, so it now has the signature sh.shardCollection(namespace,key,unique,options). options must be a document. Any fields in options are passed straight through to the shardCollection command. Expected fields include numInitialChunks and collation.

      For example,

      sh.shardCollection('test.coll', {a: 1}, false, {numInitialChunks: 5, collation: {locale: 'en_US'}})
      

            Assignee:
            steve.renaker@mongodb.com Steve Renaker (Inactive)
            Reporter:
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              7 years, 19 weeks, 2 days ago