[00:33:58] <jecran> db.test.find( { a: { $exists: true } } ... what is the most efficient way to search for 2 different values? (can be from different records)
[00:34:50] <jecran> I have 2 values to test, and want to check if any records contain either value
[10:20:24] <leporello> Hi. I'm using mongoose and get an error: { name: 'MongoError', message: 'getaddrinfo ENOTFOUND' }
[10:27:56] <leporello> Hm. Missing the parenthesis in ternary operation caused wrong string to connect.
[11:16:50] <flok420> I'm trying to count the number of occurences of a certain value. e.g. 0.1...0.2 should be counted, 0.2...0.3, etc. I tried the following but it says that it did not expect ':' without any further indications which : it did not expect. any suggestions?
[11:29:57] <symbol> If I'm only doing bulk writes, is there and advantage to using the Bulk api vs inserting with an array?
[11:32:31] <cheeser> probably depends on the driver
[11:33:44] <symbol> Good point, I'm working on some lesson plans but am using the MongoDB shell to teach it. I'm debating going over bulk operations due to the variety of driver handling.
[11:38:57] <zamliman94> Is it possible to use geoNear combined with group ?
[11:39:39] <zamliman94> the geoNear sorting is lost with group, and i cannot use geoNear after group, because geoNear has to be the first in pipeline order
[13:11:24] <zamliman94> any tips for advanced sorting in mongodb?
[13:40:32] <coudenysj> zamliman94: do you have a specific question? :)
[16:46:46] <dorongutman> I have a social activity-like collection, with documents that look like this: http://pastebin.com/kq6qnUtJ. as you can see there’s 3 “status” creations and then a “delete” on one of them.
[16:47:28] <dorongutman> how can I get all the items that were created but not deleted (if they were deleted I need to get just the delete) ?
[16:48:16] <dorongutman> I tried with the aggregation framework but I can’t seem to get it right - $group loses the data on the document, and I don’t know how I get the delete itself (which must be the most recent one)
[16:49:39] <StephenLynx> imo, you would be better with a separate collection.
[16:51:20] <GothAlice> dorongutman: $group on the "group" dbref, collect ($addToSet) the actions to create a new list of all actions for each group, then $match on that ($and the "actions" list containing the action you are looking for and $not the delete action). You can then project/unwind/etc. from there.
[16:52:38] <GothAlice> However, likely if it exists it was created (this is a simplified case), so you can very simply $group on the "group" field, collect the actions ($addToSet), and $not the actions containing "delete".
[17:18:43] <dorongutman> GothAlice: thanks. I’ve gotten up to the collect the actions with $addToSet (I think) but now how do I $not the actions contatining delete, and how do I get the original document (instead of just the grouped properties) ?
[17:18:50] <dorongutman> this is what I have: db.EventLog.aggregate([{$match: {'group.$id': ObjectId('5591566e279871e5267b23c6')}}, {$sort: {'loggedTimestamp': 1}}, {$group: {_id: {"effectedId": "$effectedId"}, "actions": {$addToSet: "$action"}}}])
[17:19:13] <dorongutman> (the effectedId is the id of the created/deleted status)
[17:20:56] <dorongutman> GothAlice: actually - I do need the “delete” actions themselves, but not the “create” on the items that got deleted
[18:28:34] <fxmulder> if I have a replica set that used to have sharding enabled but now for some reason doesn't think it is enabled, how do I get it set back up as a shard member?
[18:28:57] <cheeser> did you try readding the RS from a mongos?
[18:29:38] <fxmulder> mongos still sees it as being a member
[18:36:14] <fxmulder> what on a replica set tells it if it is part of a shard set?
[19:10:37] <grandy> hello, wondering if there is a recommended tutorial for understanding what mongoose can do .. i've used "raw" mongo before but now working on a codebase that uses mongoose, trying to figure out which approach will be best for writing some report
[19:32:11] <GothAlice> Hint: if it's "interpreted", it's running a bytecode virtual machine behind the scenes. The compilation step is just hidden from you in most cases. (I.e. the typical "PHP throwing out the compiled bytecode after each request" problem solved by bytecode caches, etc.)
[19:32:40] <StephenLynx> I know, but woudn't using JVM require it to be compiled to bytecode beforehand?
[19:32:49] <StephenLynx> plus, JVM isn't that faster than V8
[19:33:01] <GothAlice> That VM may boil things down to machine code in the end (JIT and whatnot), but it's still using a parser -> AST -> compiler -> bytecode translation process.
[19:33:42] <GothAlice> StephenLynx: Speed isn't everything. The JVM rocks because of speed, AND everything else it does.
[19:34:22] <fxmulder> what on a replica set tells it if it is part of a shard set?
[19:34:44] <webjay> Can I have both replication and slaves?
[19:47:42] <webjay> it seems a hidden replica is what I want
[19:49:47] <cheeser> replica sets aren't really the best option for scaling reads. you'll want sharding for that.
[20:51:30] <hahuang65> joannac: thanks for your help in our ticket a few weeks ago :) Never got a chance to respond.
[21:44:21] <kaliya> Hello, I have a dedicate partition for mongo data. With a replicaset on mydb, what's the best way to not make mydb.* files to fill 100% the partition? Is there some limit option? Mongo 2.4
[22:23:24] <benjick> Is there a way to do this I'm trying to achive? https://gist.github.com/benjick/2a262acc33bf227c038c
[22:47:48] <grandy> can anyone explain the meaning of the terms in an aggregate group clause? not sure i understand the quoted string with a $
[22:50:50] <Doyle> Hey. How much are the Enterprise Advanced subscriptions? Just looking to get OpsManager for backups.
[22:57:08] <grandy> newb question: for this query why does it fail if I substitude _id with something else? db.mycollection.aggregate([ {$group : {_id: "$a", count: {$sum: 1}}}])
[23:00:22] <grandy> any recommended way to quickly get up to speed on aggregates? any good online tutorials?
[23:34:46] <Freman> [[09:27:21.202]] [ERROR] { [MongoError: Executor error: Overflow sort stage buffered data usage of 35067470 bytes exceeds internal limit of 33554432 bytes] name: 'MongoError' }