[00:10:17] <LyndsySimon> I finally got in my nib smoothing supplies - and just finished grinding my first nib.
[00:10:36] <LyndsySimon> I made a ~0.6mm stub from my fine Hero 338.
[00:15:35] <rOOb> Hello all. I'm banging my head against my desk on this. How can I aggrigate the sum of a field in my documents? I have this so far http://pastebin.com/SnCWEf5G
[00:15:45] <rOOb> That also includes what my document look slike
[00:16:34] <rOOb> I want to find all deposits by "user -> id" then sum all of the documents "amount" field
[05:19:03] <Streemo> im doing an upsert where I increment X, and Y. I have another field Z = f(X,Y). Is there a way to update Z upon upsertion, or do i need to run another query?
[05:20:07] <joannac> Streemo: why can't you do it in your app?
[05:25:24] <Streemo> well if Z was linear this wouldnt be problem lol
[05:25:37] <Streemo> i guess im gonna have to run another query
[05:29:21] <lucasgonze> My data disk for a Mongo primary with two replicas is at 95%. I did db.collection.remove({}) on a 12GB collection and verified via dataSize that it was empty. But df -h shows that the disk utilization is still 95%.
[05:29:54] <lucasgonze> Could there be a delay in executing the deletion? Maybe for propagating it to the secondaries?
[05:31:44] <joannac> removing documents does not free disk space
[05:31:46] <preaction> no. mongo never gives disk space back. it uses it
[05:32:13] <preaction> *never subject to conditions and limitations. not valid in KY or LA
[05:32:39] <joannac> lucasgonze: resync your nodes to reclaim the disk space. or if you can, dropping a database will release disk space
[05:34:05] <lucasgonze> does resync make sense in the context of a master?
[05:35:16] <joannac> lucasgonze: yes, step it down, and resync it from one of the others
[05:36:06] <lucasgonze> if mongo doesn't give disk space back, so it can reuse it, does that mean it ordinarily claims a fixed size data file?
[05:36:51] <lucasgonze> the issue here is the chance of filling up the disk over night, given that we're at 95% right now. but if the space used is fixed, that's not an issue.
[05:37:16] <joannac> also, how large is your oplog?
[05:37:29] <joannac> and how much data are you needing to resync?
[05:40:38] <Auger> I'm building a commenting system for single pages
[05:40:49] <Auger> the comment schema has the pages id stored as the post_id
[05:40:57] <Auger> if it's a top level comment, it has a parent of 0
[05:41:12] <Auger> if it has a parent, it has that parents id stored in parent_id
[05:41:28] <Auger> if it has a child comment, it has the id stored in an array called 'children'
[05:41:56] <Auger> i am trying to display all the comments in as few queries as possible
[05:42:01] <Auger> can anyone point me in the right direction
[05:42:28] <Auger> currently i do a .find() which returns all comments with a parent of 0
[05:42:42] <Auger> then i do an ajax get on each of those comments to get its children
[05:42:50] <Auger> and then i do an ajax get for each of those to get its children
[05:45:31] <Auger> oi, i wanted to at least show 2 or 3 levels
[05:46:04] <preaction> cache the entire lineage of the comment. if you have A -> B -> C, then C's lineage is "A:B". then you can query for all comments that have a lineage that begins with "A:"
[05:52:47] <preaction> i don't care where? i've done it in a separate table. it's a cache of the real tree structure that exists, the parent_id
[05:56:09] <Auger> Streemo, preaction: I appreciate your input, thanks!
[05:56:52] <Streemo> preaction: yeah i would probably do in a separate one also
[05:58:53] <Streemo> but honestly i think it might be better to hold off and run separate calls when the user actually wants to see the comments children to this comment
[05:59:41] <preaction> it depends on the content and users
[14:56:22] <mattmaybeno> that makes sense.. sounds good
[14:56:31] <pjammer> i read something about journal and writes; maybe it explains the GB difference?
[14:56:37] <_ari> i'm learning it right now and i have to perform some complex queries
[14:57:13] <pjammer> i don't honestly care though tbh, if i can prove a secondary is up to date, can't i just stand down the primary, make a new one elect, remove the old primary and add it back to re replicate?
[14:57:20] <cheeser> _ari: before the $group, add a $match stage to your pipeline
[14:57:43] <pjammer> would that reallocate the files, i wonder? or is repairDatabase really the only way to get the disk usage down?
[14:58:50] <bsdhat> Hi, I'm having trouble compiling the tutorial code for the simple cpp client. Can anyone assist me?
[14:59:03] <_ari> cheeser, ah putting it before worked!
[15:34:56] <Lonesoldier728> this seems incorrect because I have to search an object i think in the array
[15:43:46] <FIFOd> I'm using MongoDB 2.4 and have a field that is either 0 or a double. It looks like a query that has $type: 1 (which is the double type), does not find 0 values correctly. Is there a way to check if an item is zero or double?
[15:45:15] <cheeser> then the driver would use the double value in the bson and the types would match
[15:45:19] <FIFOd> @cheeser I tried setting it via the command line to 0.0 and it didn't work
[15:45:52] <FIFOd> @cheeser .update({_id: ObjectId("555f4cba8abd8ba58d103fbf")}, {$set: {score: 0.0}}) set the score to 0
[15:45:56] <cheeser> hrm. i need to go meet some folks for lunch, but i'll be back in a bit and can take a closer look if you're still having problems.
[15:48:40] <Lonesoldier728> does this look efficient or is there something better I can do
[16:27:57] <csd_> If I'm using range balancing, for example, and I have shards that need to be rebalanced after adding a new shard, will the keys within each shard still be linearly distributed afterwards e.g. all keys in shard number A < B will be smaller than the keys in shard B?
[18:30:30] <zhenq> after enable auth, from one replica member(secondary, as m-002), I still be able to get all results if running remote call of "db.isMaster()" towards primary member(as m-001). is this expected? command: /bin/mongo —host m—001:27017 —eval 'printjson(db.isMaster())'
[21:25:47] <Lonesoldier728> http://mongoosejs.com/docs/schematypes.html I am looking at mongoose and "long" is not a data type does that make sense or can I use a long