PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Thursday the 13th of June, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[14:06:32] <bjonnh> Hi
[14:06:52] <bjonnh> I'd like to recover the _id of an item as a string in c++. How can I do that ?
[14:08:06] <bjonnh> p.getField("_id").toString() gives me _id: ObjectId('51afbda01e7e8a78f336b2d2')
[14:08:16] <bjonnh> getStringField gives nothing
[14:12:36] <Maro> stennie: Sorry! I think my issue is actually coming from using mongo-hadoop from maven repository which seems to be quite out of date...building master from github and will see if that clears it up ^_^
[14:14:51] <stennie> @Maro: no worries. if you do want someone to help, you'll need to provide more details on the issue beyond "trouble with the mongo.auth.uri property" ;-). definitely worth trying latest mongo-hadoop release
[14:14:54] <bjonnh> ok found with p.getField("_id").OID().Str()
[14:17:40] <Bartzy> Hey
[14:17:46] <Bartzy> Derick: Here?
[14:18:11] <Bartzy> Or anyone with knowledge of the PHP driver - What is the difference between MongoCollection::save and MongoCollection::insert with upsert => true ? :)
[14:18:17] <Maro> Yeah sorry, my issue was that setting the property appeared to be having absolutely no effect. Just rebuilding now, will see if that resolves it. Specifically I'm getting auth issues when doing splitVectors due to the InputURI user not being an admin on admin database with permissions
[14:18:36] <Derick> Bartzy: yes
[14:18:46] <Bartzy> Derick: See ^ :)
[14:23:02] <Bartzy> Derick: ?
[14:27:21] <Derick> Bartzy: sorry
[14:27:55] <Derick> Bartzy: no difference
[14:28:07] <Derick> actually
[14:28:26] <Derick> save = insert if there is no _id field, if there is an _id field, it's an update+upsert
[14:40:58] <bjonnh> where can I find an example for iterating over fields of an entry ?
[14:41:03] <bjonnh> (in c++)
[14:59:07] <leifw> here's one from the mongo source code:
[14:59:10] <leifw> BSONObjIterator i( obj );
[14:59:10] <leifw> while ( i.more() ) {
[14:59:10] <leifw> BSONElement e = i.next();
[14:59:10] <leifw> uassert( 13511 , "document to insert can't have $ fields" , e.fieldName()[0] != '$' );
[14:59:13] <leifw> }
[14:59:21] <leifw> (obj is a BSONObj)
[15:01:49] <Nodex> use a psatebin lol
[15:06:32] <bjonnh> thanks leifw
[15:12:51] <deepy> I hooked up my application with mongoDB, I use updates and inserts which are unacknowledged and performance didn't drop by 10%. It dropped _TO_ 10%
[15:13:18] <deepy> Should I give up at this point or continue working on it?
[15:14:59] <leifw> deepy: if you have performance pain, here's a shameless plug: http://www.tokutek.com/2013/05/sysbench-benchmark-for-mongodb-v0-1-0-performance-update/
[15:34:51] <deepy> leifw: I don't suppose I could sign up for an evaluation :>?
[15:35:12] <deepy> Though I won't be able to buy it even if we end up using it, open-source and whatnot
[15:37:16] <hroark> quick question. does anyone know how to invoke copyDatabase in the native node drivers?
[15:37:53] <hroark> i cant find it documented
[15:45:28] <hroark> nevermind. found it.
[15:47:15] <hroark> FYI, db.admin().command({ copydb: 1, fromdb: 'old', todb: 'new' });
[16:15:31] <Nodex> yo, anyone know what time it is later?
[16:36:24] <Maro> Hi guys, I have a query here which is generated by mongo-hadoop map/reduce (http://pastebin.com/UGAkHY8y) which is taking a long time to run due to the size of our collection, I've added a compound index on "ipAddress,when"...is this correct? What else can I do? :)
[16:56:54] <leifw> deepy: you're welcome to evaluate it, and it is open source
[16:57:07] <leifw> deepy: come to #tokutek or email us and we'll send you the code
[16:57:30] <leifw> deepy: rather, a binary
[16:57:42] <leifw> deepy: we're releasing the GA 1.0 very soon
[17:00:23] <Maro> Anyone have any idea about indexing for this query? http://pastebin.com/UGAkHY8y generated by mongo-hadoop
[17:05:12] <Nodex> yo, can anyone help me, I need to know what time it is later
[18:33:14] <starfly> Nodex: what's up with the time thing… :)
[18:43:36] <MrKeh> I am using pymongo and I am trying to add a string to an array via $addToSet but for some reason it is not working.
[18:43:51] <MrKeh> Anyone have any ideas why it wouldnt be working?
[19:04:30] <winterpk> Hi all. What's the best field type for storing binary data in a mongo database? Do I just make it a string with no limit?
[19:18:05] <winterpk> Anyone?
[20:06:26] <eagen> There isn't any typing of fields in Mongo is there? I think the type of the field depends on your driver. I found this with a quick Google search: http://stackoverflow.com/questions/8044290/getting-a-binary-field-from-mongodb-driver
[20:43:11] <winterpk> eagen: thanks for the link
[21:13:37] <n06> can i start a configsvr as a service on my server?
[21:13:49] <n06> trying to start up a "production" environment
[21:40:04] <changerOfSea1> hey all, quick question about projection and $elemMatch, can I use it to get a certain value from a sub-doc in an array? like on the page http://docs.mongodb.org/manual/reference/projection/elemMatch/#prj._S_elemMatch is there a way I could only get the kids names and not their ages?
[21:57:06] <mcnellis> How can I execute this statement in python with PyMongo? db.collection.find( {$where: '(this.movies.length > 200)'} )
[22:02:19] <leifw> put quotes around "$where". more: http://stackoverflow.com/questions/9208578/is-it-possible-to-use-find-method-with-javascript-query-with-pymongo
[22:35:24] <mcnellis> Thanks leifw