Hi,
I've met a stranger problem. I need to delete some indexes of non exist collections and the collections's name include character '$'.
How coud I delete that in mongo shell ?
mongos> show collections
images.chunks
images.files
mainBodyHtmlContent
originalHTMLContent
system.indexes
mongos> db.system.index.find()
...
{ "v" : 1, "key" : { "_id" : 1 }, "ns" : "meiwei.${mongo.thumbnail}.files", "name" : "_id_" }
{ "v" : 1, "key" : { "filename" : 1, "uploadDate" : 1 }, "ns" : "meiwei.${mongo.thumbnail}.files", "name" : "filename_1_uploadDate_1" }
{ "v" : 1, "key" : { "_id" : 1 }, "ns" : "meiwei.${mongo.thumbnail}.chunks", "name" : "_id_" }
{ "v" : 1, "key" : { "files_id" : 1, "n" : 1 }, "ns" : "meiwei.${mongo.thumbnail}.chunks", "name" : "files_id_1_n_1" }
...
I tried this , not work.
mongos> db.${mongo.thumbnail}.files.dropIndex( { "filename":1, "uploadDate":1 } )
Mon Jun 24 11:03:25.636 JavaScript execution failed: SyntaxError: Unexpected token {
mongos> db.\$\{mongo.thumbnail\}.files.dropIndexes( { "filename":1, "uploadDate":1 } )
Mon Jun 24 11:06:23.615 JavaScript execution failed: SyntaxError: Unexpected token ILLEGAL
Any help?
Thanks
-jwu