PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 27th of January, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:00:02] <guidocalvano> how do you guys do unit testing with mongodb
[00:00:03] <guidocalvano> and
[00:00:15] <guidocalvano> how do you create fixtures in particular?
[00:09:40] <guidocalvano> ?
[00:09:54] <guidocalvano> anyone? hello?
[01:33:16] <skot> most people mock their db-objects/entities/models
[01:33:37] <skot> they sometimes also just spin up an instance of mongod (server) to test against
[01:33:46] <skot> depending on your level of testing
[02:16:09] <tehhkp> Hey I am getting an error not sure if this is the right place
[02:16:17] <tehhkp> anyone know about npm install
[03:25:25] <ehershey> I do
[03:25:35] <ehershey> a bit!
[07:54:44] <molavy> hi
[07:56:00] <molavy> i have an more than 10000 user and 1000000 node content , node content created by crawler from sites rss
[07:56:20] <molavy> each user can add tag to each node
[07:58:05] <molavy> and user added tag appear behind each node for each node , (not other users tags) , just user added tag
[07:58:18] <molavy> how should implement this
[07:58:43] <molavy> append add users tag to node
[08:04:41] <molavy> or create another collection
[08:16:52] <molavy> how can i save objectid into sql db
[08:24:19] <molavy> no idea?
[16:34:03] <StErMi> Hi guys, I've some noob question. This is my first mongodb project and I'm using it with the nodejs driver.
[16:34:42] <StErMi> Is there a place where I can find best practices and common errors?
[16:35:40] <andrepadez> Hi, in mongoose: can i use doc.save().populate('field).exec() or i have to use doc.save() then Model.find({_id: doc._id}).populate().exec()?
[16:35:51] <StErMi> For example, actually I'm parsing 1k online feeds and for each entry I'm updating with upsert a record into mongodb, my CPU is 100% used by mongo. Is it ok?
[16:40:00] <Tobsn> is there a way to write directly into a key of an array?
[16:41:15] <Tobsn> data:[{log:[0,0,0]},{log:[0,0,0]},{log:[0,0,0]}] - like this, i want to increment in object 0 log 0: data:[{log:[1,0,0]},
[16:41:47] <Tobsn> data: [{log: [0,0,0]},{log: [0,0,0]},{log: [0,0,0]}] - like this, i want to increment in object 0 log 0: data: [{log: [1,0,0]},
[16:41:52] <Tobsn> removed those smilies ;)
[16:45:06] <Tobsn> data.0.log.0 ? does that work?
[16:48:05] <andrepadez> Tobsn: data[0].log[0] = 1 would get you [{log: [1,0,0]},
[16:48:39] <Tobsn> > db.test.update({"_id":ObjectId("5105599cdefd5d1bcde70102")},{$inc:{data.1.log.1:1}});
[16:48:40] <Tobsn> Sun Jan 27 17:46:41 SyntaxError: missing : after property id (shell):1
[16:49:26] <Tobsn> {$inc:{data[1].log[1]:1}}
[16:49:28] <Tobsn> same error
[16:54:09] <andrepadez> try attributing it before:
[16:54:40] <andrepadez> var log = data[1].log[1]}
[16:54:49] <andrepadez> var log = data[1].log[1] sorry
[16:55:13] <andrepadez> {$inc:{log:1}}
[16:57:24] <Tobsn> ReferenceError: data is not defined (shell):1
[16:57:29] <Tobsn> hmm...
[17:13:22] <Tobsn> andrepadez
[17:13:30] <Tobsn> db.test.update({},{$inc:{data.1.log.1:1}}) <- fail
[17:13:34] <Tobsn> db.test.update({},{$inc:{"data.1.log.1":1}}) <- success
[17:13:35] <Tobsn> ;)
[17:58:15] <Tobsn> hmm 2.2.2 on osx gives me random disconnects
[17:58:17] <Tobsn> Failed to connect to: localhost:27017: send_package: error reading from socket: The socket is closed
[18:00:43] <Derick> there is probably a reason for that...
[18:02:13] <Derick> what do the logs say?
[18:07:51] <back2dos> hiho
[18:08:18] <Tobsn> Derick, lemme check
[18:08:24] <back2dos> say, can anyone suggest a moreless complete reference on projection?
[18:09:04] <arussel> Hi, I'm looking at mongodb books. The definitive guide has good review but is 2,5 years old. Any better books ?
[18:11:28] <Tobsn> Derick, NOW its of course not showing any error anymore...
[18:13:01] <Tobsn> but it seems its a php-fpm issue
[18:13:01] <Tobsn> [initandlisten] connection accepted from 127.0.0.1:51926 #26 (11 connections now open)
[18:13:42] <Tobsn> for a single client (me) reloading thats quiet a few connections, with only 4 workers running
[18:33:49] <Derick> Tobsn: whivh version of the driver? and, are you on a replicaset?
[19:15:50] <Tobsn> Derick, just local setup, PHP Version => 1.3.2RC2-dev, 2.2.2 mongod
[19:21:09] <Derick> RC2-dev? that's adventerous :-)
[20:44:26] <dangayle> Why does the aggregation framework have such crap examples in the documentation?
[20:44:31] <dangayle> argh
[20:52:05] <w3pm> hi
[20:52:55] <dangayle> hi
[21:23:49] <svm_invictvs> I can't recall, but is there a restriction as to what type can be used for a key in Mongo?
[21:32:17] <andrepadez> question, using mongoose: can someone have a look at https://gist.github.com/4650674 ???
[22:08:49] <andrepadez> Question: mongoose: if i have a model, retrieve an object from database, and try to add a new property nothing happens... why???
[22:09:19] <andrepadez> i'm not trying to save it to the database, only render additional info
[22:10:49] <skot> svm_invictvs: field names (keys) are strings
[22:12:26] <skot> andrepadez: I'd suggest checking your query to make sure it works as you expect.
[22:13:06] <andrepadez> it does
[22:13:19] <andrepadez> skot: it does, all the objects are retrieved
[22:15:46] <skot> Locations as well?
[22:16:57] <skot> it locations an array or a cursor passed back here? function(err, locations)
[22:17:14] <andrepadez> skot: forget Locations: i have these 3 lines: console.log(1, account);account.teste = 'sdssdawrwerwe';console.log(2, account);
[22:17:44] <andrepadez> and i get https://gist.github.com/4630603
[22:19:04] <skot> this seems like a mongoose question, and I'm no mongoose expert.
[22:19:27] <andrepadez> ok thx
[22:47:18] <jacobclark> has anybody an experience in using mongodb with laravel
[23:27:57] <mansoor-s> so whats the rule for Indexies?
[23:28:15] <mansoor-s> you only build indexes on fileds that you think you will be searching by?
[23:43:10] <dangayle> mansoor-s: Indexes also help when sorting