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

dropIndex() by index name is not mentioned in wiki.

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • v1.2
    • None
    • Server
    • None

    Description

      The wiki page on dropIndex only mentions the syntax using a document for the index, as in

      db.coll.dropIndex({x:1})

      but an index can also be dropped by its name:

      db.coll.dropIndex('x_1')

      There is also a related bug SERVER-1887: If a custom name was specified during index creation, only the name syntax works and not the document syntax (except when using runCommand(

      {dropIndexes:...}

      ) directly). Maybe should be mentioned in a red warning box until the bugfix is released. See CS-4711 for more details about this issue.

      The docs page on dropIndex is minimal and doesn't provide any examples.

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            thomas.rueckstiess@mongodb.com Thomas Rueckstiess
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 42 weeks, 5 days ago