Can't delete index that contains a integer key

28 views
Skip to first unread message

Chris Chen

unread,
May 11, 2012, 6:28:25 AM5/11/12
to mongod...@googlegroups.com
When I list indexes I have an index like this in one of my collections:

"key" : {
"p" : 1,
"f" : 1,
"0" : "d"
}

I can't seem to delete it with db.mycol.dropIndex({p:1,f:1,"0":"d"})

What is the "0":"d" and how do I delete this index?

Sid

unread,
May 11, 2012, 1:45:46 PM5/11/12
to mongodb-user
Can you try deleting the index by name ?

When you create an index like 0:"d" it searches for a plugin named "d"
and silently logs a warning when it can't find one.
Created a server ticket for :

"Creating an index using a non-existing plugin should be an error not
a warning" https://jira.mongodb.org/browse/SERVER-5826

Chris Chen

unread,
May 11, 2012, 4:28:16 PM5/11/12
to mongod...@googlegroups.com
Yes dropping by name seems to work. Thanks!
Reply all
Reply to author
Forward
0 new messages