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

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

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

      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.

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

              Created:
              Updated:
              Resolved:
              11 years, 3 weeks, 2 days ago