On Dec 30, 2014, at 7:14 AM, Norbert Hartl <norbert@hartl.name> wrote:
In order to execute a javascript query you would need a javascript interpreter. As this is not feasible Mongo provides alternative constructs for the most important things you need. For the regex it would be
aMongoCollection select: { 'fieldName' -> { '$regex' -> '.*foo' } asDictionary } asDictionary
What would be the equivalent of: db.SomeCollection.find( {$or: [ { name: { $regex: /test/i } }, { description: { $regex: /test/i } } ] } ) In other words, how would a query on multiple fields be done in MongoTalk? The case-insensitive match can probably done with "$options:â (just tried it, and it works). MyMongoClass selectMany: { 'description' -> { '$regex' -> 'YADA'. '$options' -> 'i' } asDictionary } asDictionary.