Aug 152011
Creates an index in MongoDB
Answer:
In an given collection, if you want to add an index on a specify field, you can do the following in the mongodb Interactive shell.
db.test.ensureIndex( { name : 1 } )
The key "name" from now on will have index enabled.