To create an index in MongoDB,
you can do the following:
> db.someCollection.createIndex({someIndexProperty: 1})
{
"createdCollectionAutomatically" : false,
"numIndexesBefore" : 1,
"numIndexesAfter" : 2,
"ok" : 1
}
>
Reference:
http://docs.mongodb.org/manual/tutorial/create-an-index/
No comments:
Post a Comment