PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 6th of October, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:05:14] <TheDracle> How, from a mongo shell, can I print a result dataset as JSON?
[00:05:28] <TheDracle> I'm trying: JSON.stringify(db.table.find())
[00:06:32] <cheeser> it kinda already is
[00:07:34] <TheDracle> Yeah.. It's close :p
[00:07:41] <TheDracle> No quotes around the dates.
[00:08:24] <cheeser> or keys
[05:42:29] <newlex> hello
[05:43:02] <newlex> anyone around?
[05:46:30] <newlex> am I correct in assuming if I set the _id to a number, that is the ID of the row (which I can then index) and I can search by db.mydb.find({ _id: n }); and find it?
[05:46:36] <newlex> doing something wrong
[05:49:07] <newlex> and if not, how do I set the id
[15:21:04] <Jahm> So, I installed mongodb on Mavericks via home brew and this happened: http://i.imgur.com/0eGiD26.png
[15:24:18] <ron> OMG
[15:24:21] <ron> THAT IS SO COOL
[15:56:17] <johnnode> using mongo-native-driver (for node.js) -> trying to test write & read db asynchronously, mongo suck! don't get expected result. Help me to explain that. http://pastebin.com/dZAShpXS
[15:57:13] <johnnode> thanks a lot for your help.
[15:57:59] <ron> so your strategy is to tell people here that what they use sucks and then ask for their assistance? nice.
[15:59:11] <johnnode> ron: I am sorry, I don't mean that. I think I got something wrong, but actually can not figure it out. Sorry for my word
[16:00:30] <platzhirsch> When I want to define an index on an embedded document's field, do I use plural or singular in the index target? Magazine and ads entities. Do I write ads.date as index or ad.date?
[16:01:56] <johnnode> platzhirsch: Maybe this one is good for you http://www.mongodb.com/presentations/indexing-and-query-optimization-2
[16:02:20] <platzhirsch> johnnode: sure it is, thanks :)
[16:03:46] <platzhirsch> johnnode: That's a really good slide set
[16:05:09] <platzhirsch> so it seems the same name is used as in the field name, no difference between singular and plural
[17:00:52] <_harel> hi all. I've just promoted a secondary to primary, and when trying to connect to it (pymongo) I'm getting this error: "BSON document too large (75 bytes) - the connected server supports BSON document sizes up to 0 bytes."
[17:01:02] <_harel> this is a production system so obviously - stressing it now
[17:02:30] <kali> _harel: ditch pymongo altogether and check if your cluster is working from the shell
[17:03:46] <_harel> i can't even start the shell kali
[17:04:20] <_harel> kali, : http://dpaste.com/1407702/
[17:05:57] <kali> i meant the mongodb shell
[17:08:02] <_harel> mongo shell works ok kali
[17:08:07] <_harel> i can get in there - query etc.
[17:08:19] <_harel> dunno why pymongo complains max document size is zero
[17:08:39] <kali> ok. i would check the connection string your pymongo is initialised with
[17:08:52] <kali> why did you promote a secondary ? primary crash ?
[17:09:01] <_harel> primary ran out of disk space
[17:09:18] <_harel> so raised a secondary to primary while we rebiuld the raid array
[17:09:42] <_harel> the connection string seems to be ok. all that changed is the ip address to point to the new primary
[17:10:55] <_harel> if i initiate a python shell straight up, and do the db connection manually it seems to work, no error, but when i query the collections i get 'empty cursors'
[17:11:35] <kali> you need help from a python guy
[17:11:52] <_harel> i don't undertand that error though. it seems crazy
[17:12:05] <kali> yeah, sounds like a bad joke
[17:12:11] <_harel> the unfunny kind
[17:12:27] <_harel> from mongo shell its all great
[17:25:56] <_harel> kali, server name not in hosts file - that was it i think.
[17:25:59] <_harel> duh
[17:26:26] <kali> nice explicit error message :)
[18:51:24] <oxsyn> I'm attempting to switch from using sqlalchemy to mongo for my flask application. The database is built from imported data that's dynamic - and I want to build an html table from this data, which requires retrieving a set of documents, examining the 'schema' i.e. getting a list of the fields, and using them to define the columns and display the output. I'm new to mongo (first day) and am not finding any
[18:51:26] <oxsyn> obvious solutions on how I can do this. Anyone have any suggestions?
[19:37:30] <_harel> oxsyn, your solution will come from python. get the document, loop the fields from the first document and collect them to generate the html headers, then keep on looping chucking out rows.
[19:38:01] <oxsyn> _harel: thanks
[19:48:41] <_harel> oxsyn, a *very* simplistic bit of approach is sometihng like this: http://dpaste.com/1407824/
[19:48:58] <oxsyn> awesome, thank you :)
[22:01:51] <Gaddel> if two atomic updates are being done at the exact same time, what happens exactly? is a write-lock put in place and then one update overwrites the other? or will one completely fail?
[22:03:38] <Gaddel> assuming the same fields are being updated
[22:21:08] <Gaddel> anyone around?
[23:09:16] <Lobosque> using sql terminology, a user has many posts, posts has many comments. How do I findall comments that belongs to a user?
[23:16:48] <osirisx11> hi all
[23:17:18] <osirisx11> probably a very dumb question, but i've googled and tried a few things and can't seem to get it right away
[23:17:34] <osirisx11> where is bsondump located?
[23:29:41] <osirisx11> bsondump: command not found