I have a production server hosted in mongohq with version 2.4.6. I need to add text index to one of the collections. I tried using the below command from mongo client connecting to my remote server:
db.logs.ensureIndex({title: 'text', description: 'text'})
By default, we cannot add index to production server, since it is restricted by mongohq. But I need to restart the server like below to enable text search:
mongod --setParameter textSearchEnabled=true
But this is possible only for local servers.
Does anyone know how to get this done on remote mongohq server?
Try this in mongoclient "mongo", it should work for you
also check out these links, they may be helpful
http://docs.mongodb.org/v2.4/tutorial/enable-text-search/
mongodb: enable textSearch