[12:38:49] <m3t4lukas> hey guys :) Do you know a way to debug morphia aggregation? Like extracting a JSON array from it or stuff like that so I can test it in the console client?
[12:40:57] <m3t4lukas> Another thing I want to ask is whether anyone in here knows when the results of the last wave of exams is going to be published? Please excuse my impatience, I'm excited about it :P
[13:07:01] <m3t4lukas> there is a mistake in the documentation here http://mongodb.github.io/morphia/1.1/javadoc/org/mongodb/morphia/aggregation/Projection.html#projection%28java.lang.String,%20java.lang.String%29
[13:08:12] <m3t4lukas> doc says the second parameter is the new name. In reality the first parameter is the new name and the second parameter is the name of the field before the stage
[13:31:37] <cheeser> m3t4lukas: in reality what now?
[13:32:38] <cheeser> hrm. you might be right. that'd be a bug. i'll have to write some tests.
[13:37:33] <m3t4lukas> cheeser: everythig works for me as it's intended when I switch out the parameters
[14:14:58] <cheeser> m3t4lukas: actually, looking at code/docs, i think it's correct just a bit awkwardly phrased...
[14:15:38] <cheeser> the first param is the name of the field created by the projection and the second param is the source of the value to fetch
[14:16:10] <cheeser> the overloaded versions have more complex value sources, e.g.
[14:24:35] <m3t4lukas> cheeser: okay, I think "projectedField - the new field name" pretty much says that this parameter takes the name of the field after renaming by the stage
[14:33:07] <m3t4lukas> cheeser: what about an overload of the toString() function for AggregationPipeline just like the one for the classes implementing Query? Stuff like the previous error could be found way faster that way
[14:34:00] <cheeser> oh, hell. actually i think there is a bug there.
[14:34:20] <cheeser> i'll have to write some tests to validate this.
[14:39:20] <m3t4lukas> unfortunately there is none now :/
[14:42:25] <cheeser> there's some but there definitely could be more
[14:44:11] <m3t4lukas> ah, okay. I just put it into the log and wondered why it just tells me the fully qualified name of the class and the address of the object
[14:57:30] <m3t4lukas> cheeser: are you working at 10gen? and if yes, why don't you just let a dedicated package do that stuff? They are a special kind of people :P
[14:58:56] <cheeser> i do, yes. and i'm actually working with a contractor on this .deb package. but I still need to understand what he's doing so we can maintain it once he's gone.
[15:00:51] <m3t4lukas> that sounds kinda rational. Have fun ^^
[15:31:07] <m3t4lukas> cheeser: yeah, it's rational for a paranoid oriented company :P
[15:31:49] <m3t4lukas> If I had to do packaging I'd just ask someone else if the one who made it for me went on
[19:28:35] <bmanturner> Hey everybody. I have an implementation question. Does anyone have a moment?
[19:33:28] <bmanturner> I am building a timeline using timestamped documents. If a user creates a large amount of these documents in a short amount of time, I would like to reduce noise by only returning one of those documents.
[19:35:45] <bmanturner> Let me clarify: I want to return 10 documents to populate a timeline and they are sorted by a timestamp. If, say, 8 of these were created by a single user over a short period of time, I would like to only retrieve one of those instead of 8, so that the remaining 7 documents are what would normally follow.
[19:36:30] <StephenLynx> so you want to specify intervals and return only one document per interval?
[19:37:02] <bmanturner> Per user, and per another attribute on the document, yes.
[19:37:30] <bmanturner> I'll prepare a pastebin, in case it helps.
[19:38:27] <StephenLynx> use aggregate with a group
[19:40:09] <bmanturner> So, in my instance, users are logging their high scores on arcade machines. Each machine has an ID, and scores hold a reference to a userId and a machineId. If a user logs several scores on a single machine within a specified interval, I would like to only return the highest score logged in that interval.
[19:40:18] <bmanturner> Is aggregation still the best solution?
[19:52:16] <StephenLynx> I thought you were talking about node
[19:53:53] <bmanturner> Nah. I'm a Junior dev looking to get a lay of the land, so I'd rather learn something new like Phoenix then box myself into a certain stack.
[19:54:25] <StephenLynx> you are doing exactly that, though.
[19:54:31] <StephenLynx> you are boxing yourself with a framework.
[19:54:49] <StephenLynx> if you really want to get out of the box, you want something that decouples FE from BE
[19:55:20] <StephenLynx> these will just keep you from actually learning how to write web apps.
[19:55:24] <bmanturner> Phoenix is fe agnostic? I was planning on using React/Redux on the FE
[19:55:39] <StephenLynx> >Phoenix is a framework for building HTML5 apps,
[19:55:45] <StephenLynx> it is built to be couples with FE
[19:57:53] <StephenLynx> frameworks are for code-monkeys.
[19:58:04] <StephenLynx> if you keep using them, you won't be more than that.
[19:58:26] <StephenLynx> sure, if you just want to throw some quick hack and could have done it raw, no problem.
[19:58:32] <bmanturner> Super close to the metal, there. As I don't get to use this stuff for work and can only use these things for hobby projects I need something that makes singe-man development a little more manageable
[19:58:34] <StephenLynx> but if can't go without them, thats bad.
[21:13:04] <ohlol> https://gist.github.com/ohlol/9c271b37ade465b264fd when i run mongodump, it creates a directory per db but only config and admin have any data
[21:13:27] <ohlol> that is from running mongodump on the mongos
[21:16:13] <ohlol> i find it difficult to believe this has never been a thing
[21:26:17] <cheeser> as i mentioned, give it a database name to dump
[21:26:57] <cheeser> oh, i see what you're saying.
[21:27:44] <ohlol> so upon further inspection, i've discovered that the dbs are not partitioned. i tried dumping them directly from the shard primary but there is no bson
[21:28:46] <cheeser> copyDatabase() doesn't work for you?
[21:29:14] <ohlol> the instances are not on the same network
[21:29:32] <cheeser> is one network visible from another?
[21:35:35] <ohlol> i set up an ssh tunnel and got copyDatabase working
[21:35:46] <ohlol> i'll just write a script to run that
[21:41:49] <ohlol> looks like it's working, cheeser. thanks for the help
[22:10:18] <charis_> Hi all, can someone help me with replication set issues? "errmsg" : "exception: need most members up to reconfigure, not ok : test.com:27017", "code" : 13144. I get an error when adding a replica set with ssl turned on. I can connect to it by specifying --ssl in the command line. Is there any way to add ssl to rs.add() ?