[DOCS-596] dropIndex() by index name is not mentioned in wiki. Created: 10/Oct/12  Updated: 02/Nov/16  Resolved: 24/Apr/13

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: v1.2

Type: Improvement Priority: Major - P3
Reporter: Thomas Rueckstiess Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-1887 dropIndex not working if a name was s... Closed
Participants:
Days since reply: 10 years, 42 weeks, 5 days ago

 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.



 Comments   
Comment by auto [ 26/Apr/13 ]

Author:

{u'date': u'2013-04-08T14:59:43Z', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-596 make drop by index name more explicit

Signed-off-by: Sam Kleinman <samk@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/b5cf23d61e30881c7f3b7d4e85d7c1a8932099f1

Comment by auto [ 26/Apr/13 ]

Author:

{u'date': u'2013-04-08T14:59:43Z', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-596 make drop by index name more explicit

Signed-off-by: Sam Kleinman <samk@10gen.com>
Branch: v2.2
https://github.com/mongodb/docs/commit/e755a0a37d78c984c471508869f277a74021dadb

Comment by Ed Costello [ 15/Jan/13 ]

Doing old ticket cleanup…can we make it clearer that "index" is either a string specifying the name of the index or a document specifying the key of the index?

Comment by auto [ 11/Oct/12 ]

Author:

{u'date': u'2012-10-11T14:11:52-07:00', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}

Message: merge: DOCS-596
Branch: master
https://github.com/mongodb/docs/commit/27f20982c464137687021d527d18d707992da739

Comment by auto [ 11/Oct/12 ]

Author:

{u'date': u'2012-10-11T06:57:46-07:00', u'email': u'kay.kim@10gen.com', u'name': u'kay'}

Message: DOCS-596 dropIndex by name
Branch: master
https://github.com/mongodb/docs/commit/4a07d6d9cf4ca2696c77a104b3c31dc23e6ebd67

Generated at Thu Feb 08 07:39:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.