[00:15:53] <Guest76948> hi all, im pretty new to mongo. ive read a lot about using collections vs embedded documents. im having trouble understanding which one i should use in a given situation.
[02:21:44] <dharmaturtle> In this tutorial, what does the "previous" parameter do? Its only in the code once, and is never used. http://cookbook.mongodb.org/patterns/count_tags/
[02:24:05] <cheeser> reduce() takes a key/value pair.
[02:24:17] <cheeser> why it's called previous, i dunno
[02:26:38] <dharmaturtle> so it could be anything? I could call it "lisjflkjslefj" if I wanted to?
[02:37:11] <begizi> Anyone out there using node and mongoose, what is a clean and secure way to prevent sensitive user data from being sent out from the database on an api? ie keep the hashed password from being sent via the user rest api
[05:05:56] <dharmaturtle> Does anyone know why this isn't incrementing "total", but appending it like its an array? I think? I'm very new to javascript. http://imgur.com/DkAnVJf
[05:08:25] <joannac> Reduce takes in a key and an *array of elements*, not a single element (which I think is what you're assuming)
[05:08:40] <joannac> array of elemetns for the "value"
[09:19:18] <Nodex> I'm out of ideas, all I can advise is to dump the db to a local db which will tell you if it's a communication problem between you and mongohq
[09:35:43] <Number6> ayemeng: Is the CPU or RAM being maxed out?
[09:36:11] <Number6> ayemeng: As for write concerns in the Mongo Shell, you need to call getLastError - which will set the desired write concern for you (journal, etc)
[13:38:35] <Nodex> tbh I'm surprised nobody thought of Key/Value store drives before, I used to assume that's how they worked anyway
[13:39:30] <Nodex> Personaly I think the possibilities are endless with it
[13:40:03] <Nodex> they have essentially given us Application level raid at the same time
[13:43:56] <Number6> I miss my IB storage cluster, that was great for low latency
[14:27:36] <_Heisenberg_> Hi folks, I'm playing around with 2PC like described here: http://docs.mongodb.org/manual/tutorial/perform-two-phase-commits/ and came to a problem. Let's say I'd like to check the accountbalance in the same query where I update it. Can I determine for which reason the update may has failed? It could fail because the balance is not sufficient or because the transacation has already been applied (being in a recovery process)
[14:31:08] <Nodex> That's down to your applciation to determine
[14:33:39] <_Heisenberg_> Nodex: to clearify: http://pastie.org/8426986
[14:35:28] <_Heisenberg_> the problem is: if the update fails because the balance is too low, the transaction needs to abort. If it fails because the transaction has already been applied, it should go on.
[14:36:11] <_Heisenberg_> checking it in two queries is not possible since the queries would not be atomic
[14:38:14] <Nodex> I don't think 2pc will work for that
[14:41:58] <_Heisenberg_> I think they tried to explain how to do it under "Using Two-Phase Commits in Production Applications" but I don't understand it. In particular what is meant by: "... the application would also modify the values of the credits and debits as well as adding the transaction as pending." (first point of the second enumeration)
[14:54:27] <Nodex> if it were me I would just send very important transactions to a database designed for it
[15:00:24] <_Heisenberg_> Nodex: this is actually what I'm doing, just looking for alternatives ;)
[15:54:06] <akkroo_nick> Hi, quick question, is there a way to specify what interface mongodb uses to connect to other replica nodes
[15:54:48] <akkroo_nick> or is this specified by the IPs it is set to bind to
[17:18:12] <Novimundus> I'm using PyMongo and I want to pull solely one field from every object in my collection. I keep using find({attr:val}), but it's returning the entire object...how do I pull solely the attr value?
[17:21:01] <Novimundus> Ah. It appears I am reading the wrong documentation. Much thanks.
[18:14:49] <ccmonster> hey guys - i have a pymongo script, and my mongo obj is Database(MongoClient('localhost', 27017), u'twitterData'), but i keep getting this error: serWarning: database name or authSource in URI is being ignored. If you wish to authenticate to twitterData, you must provide a username and password.
[18:15:07] <ccmonster> I don't know whyt hat is the case. There's no user/pass on the mongodb
[20:01:19] <ghostbar> hey guys. Someone using mongoose? Does mongoose freezes the responses? I'm trying to add more info into them manually and does not accept it. The response keeps static...
[21:22:22] <mrb_bk> Is there a $ keyword for the entire matched document inside a group in aggregate? I want to $push the results from all fields
[21:27:58] <dharmaturtle> Hi, could someone expalin why I'm getting a float result, despite calling Math.floor on this? http://i.imgur.com/zmdcK6L.png
[21:29:22] <jnewt> db.collection.ensureIndex( { a: 1 }, { unique: true } ) what is the 1 for? (example from manual)
[22:31:58] <eph3meral> so, I read recently (yesterday or so, somewhere along the docs/getting started) that mongo can and or will store and perform queries in memory provided there is enough memory available
[22:32:42] <eph3meral> is this true, how can I confirm this, and or where do I go to configure how much memory mongo is allotted and or whether or not mongo is allowed or supposed to keep everything in memory vs on disk
[22:33:37] <eph3meral> essentially I'm looking at using mongodb as a caching layer in which to read denormalized data that I package together from a relational DB
[22:34:13] <eph3meral> so, mongo won't be intended for userspace writes, just being synced up occasionally with the data in the SQL db through a pub/sub type listening daemon I've written
[22:56:49] <jnewt> i'm trying to model data that takes to form of a tree, top level being parts, second level being serial numbers, third being events, fourth being event logs. i can't figure out how to query across a level, say i want all the serial number records, regardless of part number (how to organize this?)
[22:58:58] <eph3meral> jnewt, 1) filter all the parts that have matching serial number records 2) map the set to be just the serial number records
[23:00:21] <joannac> Can you just use the aggregation framework to unwind?
[23:03:13] <jnewt> let me explain a little better maybe. i'm moving over to mongo (hopefully), because i cannot handle the data very easily in mysql (which it resides now), righ now i have a table of parts, with names, descriptions, etc., as well as a table with serial numbers, notes, manufacture date, and some other stuff.
[23:04:37] <jnewt> then there's a users table, and a users-serials map table (many to many)
[23:04:38] <eph3meral> jnewt, you may want to consider doing something like I'm trying right now - keep your data stored relationally and then use NoSQL as a denormalized caching layer for frontend/read only querying
[23:05:43] <jnewt> i need to select all the serials rows where the current user has a mapping row in the users-serials table
[23:06:48] <jnewt> eph3meral, i've hit a roadblock that will require me to either have a table of log data with a ton of columns or multiple log tables based on pn, or go to a name - value (all varchar or something) setup.
[23:07:49] <jnewt> mysql worked when there was only one part with all the same log data, now it doesn't, and the people over in #msyql pretty much confirmed that i've got a situation that could benefit from a nosql approach
[23:11:32] <eph3meral> jnewt, when all else fails paste some code
[23:12:08] <eph3meral> jnewt, if you can give us something that we can play with instantly, almost as good as jsfiddle.net, it'll be much easier for us to help
[23:13:27] <eph3meral> jnewt, as usual, strip out irrelevant details of your actual problem domain but give use e.g. 1) A few mongo insert statements for some example data to play with and 2) some example query results you would like to achieve 3) some example queries you are trying right now 4) how your example queries differ in results from what you would like
[23:13:53] <eph3meral> jnewt, it's the standard "how do I get help on IRC" principle, really... 1) show us you've done some work and 2) make it easy for us to help you
[23:14:12] <eph3meral> jnewt, I believe you have done work, it's just nearly impossible for us to connect with human worded descriptions of things
[23:14:33] <eph3meral> over a medium as terse and time consuming and easy to misinterpret as typing
[23:16:52] <jnewt> ok, i'll work out some inserts, and post in a few. but i'll have to give you the desired queries in sql or psuedo, as i cannot make the jump from the documentation to the acutal problem.
[23:17:26] <eph3meral> jnewt, that's fine, do that, the more important thing is to see the results you would like to achieve and the data set you currently have
[23:18:24] <eph3meral> jnewt, presuming to know the right way to get there is also no no number 2 of irc club - ask about what your actual end human goal is (relatively speaking here, you have a human goal of needing your results formatted in a certain way, just us what you would like in the end)
[23:18:39] <eph3meral> and then if we can copy paste your insert statements we can just play with ideas for queries
[23:19:12] <eph3meral> jnewt, but as usual, it always helps to show you've done your homework and what you have tried even if it's mostly in your head