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

Docs for SERVER-39663: db.collection.dropIndex() should not accept multiple index names

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.1.10
    • manual, Server
    • None

    Description

      Description

      Description:

      The documentation is ambiguous in whether db.collection.dropIndex() can accept the "" wildcard to drop all indexes. We should probably add a note somewhere that it isn't allowed as it may drop multiple indexes if more than one exist. Users wanting to use the "" wildcard to drop all indexes should be referred to db.collection.dropIndexes() instead.

      Engineering Ticket Description:

      We extended the dropIndexes command in SERVER-37727 to accept an array of index names. As a result, the db.collection.dropIndex() shell helper, which is built on the dropIndexes command, now accepts multiple index names. It would be less confusing for users if we added some validation to this shell helper to reject '*' and arrays of index names.

      Scope of changes

      • source/reference/method/db.collection.dropIndex.txt
      • source/release-notes/4.2-compatibility.txt

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

      Attachments

        Issue Links

          Activity

            People

              kay.kim@mongodb.com Kay Kim (Inactive)
              kay.kim@mongodb.com Kay Kim (Inactive)
              Kay Kim Kay Kim (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

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