I'd like to see the existing indexes used by MongoDB. Can I do the equivalent of
$ mongod
> use my_db
> db.system.indexes.find()
using Mongoid?
$ rails console
> ?
Would be convenient from my heroku apps using MongoHQ. Thanks!
I'd like to see the existing indexes used by MongoDB. Can I do the equivalent of
$ mongod
> use my_db
> db.system.indexes.find()
using Mongoid?
$ rails console
> ?
Would be convenient from my heroku apps using MongoHQ. Thanks!
You can get at the underlying indexes for a Mongoid model through its
collection
.This reaches down into the moped driver (in Mongoid 3). See http://mongoid.org/en/moped/docs/driver.html