PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 5th of May, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[03:58:54] <baegle> Can't figure out how to take the result of a query and turn it into an array of ID values. Anyone know how? I'm looking to get ["51972123", "51973125"] instead of [{_id:ObjectId("51972123")}, {_id:ObjectId("51972125")}]
[04:03:38] <baegle> got it with a custom function. Here it is:
[04:03:46] <baegle> function newprocess(collection) { var x = new Array(); collection.forEach(function(y){x.push(y._id.str);}); return x; }
[04:03:54] <baegle> newprocess(db.products.find({vcode:{$in:["X00572", "X00573"]}},{_id:1}));
[08:59:22] <blaizco> Hi there
[09:00:33] <blaizco> I have a replicaset and I am using it in PHP and is working fine. But, sometimes the driver can't find any candidates. If i refresh the page the problem is solved, so this is random. Any taughts about what may happening?
[09:03:54] <ron> Nodex: ^
[09:04:08] <blaizco> Greetings
[09:08:02] <blaizco> Hi
[09:08:05] <blaizco> Anyone there?
[10:49:27] <Mech0z> whats wrong with this python http://pastebin.com/pT3i3uy8 it just prints nothing, I am trying to get the number of comments from each auther of a comment to a post
[10:50:23] <kali> Mech0z: the $group is wrong
[10:50:36] <kali> wait, no. the indentation is wrong :)
[10:51:36] <kali> $author should be $comment.author
[10:51:46] <Mech0z> also whne the unwind is there?
[10:51:47] <kali> '$comments.author'
[10:52:12] <kali> yeah, $unwind let the "comments" wrapper around
[10:53:13] <Mech0z> this still dont print anything http://pastebin.com/X72M5mWk
[10:53:36] <kali> Mech0z: show me one doc
[10:58:10] <Mech0z> kali http://pastebin.com/iYNhraay
[11:01:20] <kali> we the people ? seriously ? ;)
[11:04:11] <Mech0z> think its data from the decleartion of independence and sorts
[11:05:34] <Mech0z> it works if I just paste it into mongo shell intead of trying to run it in python
[11:05:35] <kali> ok, i can't cut and paste your doc because of the line breaks, so i'm trying to reproduce
[11:05:42] <kali> Mech0z: ha
[11:06:11] <kali> Mech0z: you need help from somebody who know a bit more python than i do, then
[11:06:38] <Mech0z> :P
[16:38:40] <halfie> how do I figure out if the cursor object returned by "find(): is empty?
[16:39:30] <Gargoyle> halfie: Use count
[16:41:22] <halfie> Gargoyle, thanks!
[18:00:27] <beepbeep_> Should I avoid dbrefs?
[18:00:40] <beepbeep_> seems like theres no easy way to join two collections
[18:50:08] <sinclair-work> are the majority of people in here nodejs developers?
[18:52:10] <ron> why would they be?
[18:53:08] <kali> irk
[18:53:10] <kali> why ?
[18:53:15] <kali> why, ho, why ?
[18:53:28] <ron> nodejs is the bestest
[18:54:22] <ron> rrright, you prefer php, eh?
[18:54:42] <kali> good one
[23:15:58] <blaizco> Hi there
[23:16:23] <blaizco> Does anyone know if is normal that the php mongo driver doesn't found any candidate in the replica set?
[23:16:41] <blaizco> When this is random: i refresh it and it's working again