Executing Mongo Shell Commands

26 views
Skip to first unread message

Atit Shah

unread,
Jul 31, 2014, 11:52:22 AM7/31/14
to yiimong...@googlegroups.com
How can I execute Mongo Shell commands using Yii Mongo DB Suite extension as we can do in Yii MySQL AR? I need to add indexes and run queries for text search in mongoDB.

Uveg Pohar

unread,
Jul 31, 2014, 3:10:45 PM7/31/14
to yiimong...@googlegroups.com
Hi

I used mongodbsuite years ago, but as I remember you can define indexes in you Model class, and it will created when you use it. (On live environment you can/should disable the auto index create option)
For custom commands you can use the php MongoDB::command function.
You can have the MongoDB object from the EMongoDB class getDbInstance() function.




On 2014.07.31. 16:52, Atit Shah wrote:
How can I execute Mongo Shell commands using Yii Mongo DB Suite extension as we can do in Yii MySQL AR? I need to add indexes and run queries for text search in mongoDB.
--
You received this message because you are subscribed to the Google Groups "YiiMongoDbSuite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yiimongodbsiu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages