PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Saturday the 30th of July, 2016

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[12:13:29] <abhinavmehta> I've something to ask about mongoid-gem (Rails package)
[12:13:46] <abhinavmehta> is it okay to ask about rails-gems on this channel?
[12:19:27] <abhinavmehta> please ignore my issue, it's resolved. Thanks!
[12:32:13] <ssarah> Hei guys, whats the easy way to update fields only if the value is different from empty ?
[17:46:47] <iksik> hello
[17:49:34] <iksik> db.getCollection('virtual').update({},{$pull: {meta:{$regex: /^((?!\/).)*$/}}}) - i'm trying to pull from "meta" array, all items (strings) that are not containing "/" character, as a result i'm getting: Updated 1 existing record(s) in 0ms - but nothing actuall happens (there's over 137 matching records according to: db.getCollection('virtual').find({meta:{$regex: /^((?!\/).)*$/}}, {meta:1})
[17:49:52] <iksik> what am i doing wrong here?
[17:52:21] <StephenLynx> you forgot to set the options to make a multi update.
[17:52:30] <StephenLynx> by default mongo updates only the first document it matches.
[17:52:43] <iksik> ahhhh!
[17:52:43] <iksik> :D
[17:53:37] <iksik> now it works, thank You ;)
[19:34:32] <tom> In my Python app (using pymongo), I'd like to send multiple find_and_modify commands at once and then receive all the responses without wasting round trips in between every find_and_modify command. Is this possible? Would I need multiple sockets or could I write all requests at once into the socket? How would I implement it?