[00:15:07] <prophit> If I have documents with variable numbers of keys, how can I get a list of the keys on the document? or a count of the number of keys?
[04:08:57] <prophit> if I have a collection with docs like {id: 'somekey', count: 4}, how can I use the aggregation framework to compute the average count?
[15:39:33] <andreligne> I'm wondering if it's a good idea to have all the database-requests in one "controller"-file and then use this within all other controllers
[16:04:19] <ethanol> can someone point me at where in the documentation it describes how to reduce the number of child processes mongodb spawns at startup?
[16:34:04] <flock3> Hey guys, I have some data in this format: http://pastie.org/6064047 I think I need to do $pushAll to append the event_alerts key to something like this: http://pastie.org/6064154 - how do I format this?
[16:55:28] <vlad-paiu> Hello. have some weird issue with mongodb.. in the CLI I do something like db.col.insert({ "version": 4, "name": "address"}) , and then I fetch the record from with the C driver, but I get the 4 value as a BSON_DOUBLE instead of a BSON_INT ... is that expecting, or am I inserting it wrong..
[16:55:38] <NodeX> compound index on user_id, app_id
[16:55:49] <owen1> NodeX: i also have an upsert based on app_id and device_id. what does that mean in regards to indexes?
[16:56:12] <kali> vlad-paiu: you need to make the types explicit in the shell, as js is not typed
[17:05:25] <owen1> NodeX: ok. user+app but no need for user+app+devices. thanks!
[17:07:26] <NodeX> user+app+device will never get used
[17:26:38] <alexwaters> does anyone know how I can remove just one document with pymongo? can i do monDB['collection'].remove({'orderid':'123'}, True, Safe=True)
[17:27:48] <alexwaters> also, the docs says remove safe is deprecated and I should use w. Anyone have docs on how I should be checking that critical write/remove commands were successfully processed?
[18:00:29] <vlad-paiu> Hi. Another C question, if anybody's around.. is there an easy way to determine how many 'rows' a cursor has in the mongoDB C library ? Is it safe to save the initial cursor, then iterate with mongo_cursor_next() until no more rows left, and then start from the beggining with the initial cursor ? or will this mess something around in the mongo C library internals ? :)
[18:07:50] <vlad-paiu> tried above, and didn't work. not sure if it's the library's intended way of working, but did m_cursor->reply->fields.num which seems to return the correct value
[18:24:37] <Killerguy> how can I know if my balancer is working too much?
[18:24:57] <Killerguy> I mean, I want to know if my shard key is good enought to shard properly
[18:27:09] <jmpf> I have a secondary that is *way* behind a primary but rs.status() indicates otherwise - wanting to run repairDatabase on the secondary, then demote primary and do the same - is that going to be a problem?
[19:18:23] <nb-ben> using the JavaScript driver, calling collection.find( ... ) does not require a callback? or does the toArray( function() {}) call actually perform the query and calls its callback after fetching the results ?
[19:19:17] <beandip> Anyone here using the edelight cookbook for mongodb?
[19:20:00] <beandip> I'm running into errors getting it to load in a vagrant/chef-solo wondering if anyone here has this running that I can bounce some questions off
[19:28:43] <tubbo> hey guys, does Mongo lock when you write to the DB?
[19:59:43] <andybons> would someone mind explaining to me why an aggregation result set's length would be different than the result once its been run through { $group: { count: $sum: 1}} ?
[19:59:57] <Garito> I think in a conditional with a regex
[20:00:11] <mr_smith> i think you have a number of options, but i'm pretty sure you're going to have to do multiple aggregations. if you're worried about load, you can query secondaries or cron the queries every 5 minutes and cache the results.
[21:01:15] <owen1> i want to add a compound index - app_id and user_id. i only have 3 types of apps. does it mean the user_id should be the first index and the app_id second?
[21:01:27] <saml> how can I saerch for documents that has a sub document (nest level not known) with a key val header_size: 2 ?
[23:39:09] <solidus-lake> i started the slave and told it of the master
[23:39:12] <solidus-lake> how do i start an arbiter
[23:40:47] <owen1> i want to add a compound index - app_id and user_id. i only have 3 different apps ids. does it mean the user_id should be the first index and the app_id second?