[DOCS-558] db.collection.ensureIndex options should include name option Created: 26/Sep/12  Updated: 30/Oct/23  Resolved: 27/Sep/12

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Minor - P4
Reporter: Gianfranco Palumbo Assignee: Ed Costello
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 11 years, 20 weeks, 6 days ago

 Description   

In here:
http://docs.mongodb.org/manual/reference/method/db.collection.ensureIndex/

E.g.

db.test.ensureIndex({foo:1},{name:"myfooindex"})

It should be written than you can specify the index name, instead of being automatically generated by concatenating the names of the indexed fields and their direction (i.e. 1 or -1 for ascending or descending).
http://www.mongodb.org/display/DOCS/Indexes#Indexes-CreationOptions



 Comments   
Comment by auto [ 27/Sep/12 ]

Author:

{u'date': u'2012-09-27T08:00:51-07:00', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}

Message: minor: DOCS-558 style edit
Branch: master
https://github.com/mongodb/docs/commit/ad16381d4db14ced54715fee3b515b0fe62f0ee3

Comment by auto [ 27/Sep/12 ]

Author:

{u'date': u'2012-09-27T07:59:00-07:00', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}

Message: merge: DOCS-558
Branch: master
https://github.com/mongodb/docs/commit/cbbf051bb69795a46d780a20c032dd8eb21f3fca

Comment by auto [ 27/Sep/12 ]

Author:

{u'date': u'2012-09-27T06:56:16-07:00', u'email': u'epc@10gen.com', u'name': u'Ed Costello'}

Message: DOCS-558 add name, cache options to db.collection.ensureIndex()
Branch: master
https://github.com/mongodb/docs/commit/7c238b5b33b5953c220f1e726ec86cb70733a004

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