mgo

create index ignores name

Bug #1275821 reported by JP Phillips
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mgo
Won't Fix
Undecided
Unassigned

Bug Description

The following line, http://bazaar.launchpad.net/+branch/mgo/v2/view/head:/session.go#L868, is not setting the name from the Index struct passed into the function.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Indeed, it uses the default index name which is used by the other drivers. The field is used when you read the indexes, though.

Is there a use case for manipulating the index name by hand?

Setting as Won't Fix for now, until we have more understanding of the use cases.

Changed in mgo:
status: New → Won't Fix
Revision history for this message
JP Phillips (jp-r) wrote :

It's a standard part of the ensureIndex command, see http://docs.mongodb.org/manual/reference/method/db.collection.ensureIndex/#db.collection.ensureIndex.

The options document contains a field "name" which allows the user to specify the name for the index rather than let mongo generate it.

The use case is it's functionality provided by the standard mongo command.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.