[00:10:39] <windsurf_> I have several forms I need to collect data in, they are each subsections of an overall form. should I create a collection called 'subsection' and have a property called 'type' or should I make different collections for each unique structure, like 'subsectionFoo', 'subsectionBar'...
[00:10:53] <windsurf_> (rather than type being 'foo' and 'bar')
[01:38:26] <Boomtime> that sounds possible, $or will only count a document once, but if you run the predicates seperately the same document could show up in multiple clauses
[01:40:06] <bros> https://gist.github.com/brandonros/ae702a7767f320be10a1 Can I upsert a subdocument like this?
[01:40:15] <_ari> Boomime: this is the query -> http://paste.ubuntu.com/11422581/
[01:40:54] <Boomtime> @bluesnow: i see what is going on actually, you have two $or at the same level, which in a hashmap means that one overwrites the other - you don't have two $or clauses, only one of them survives
[01:41:13] <Boomtime> you can use $and to get around the language limitation
[01:42:07] <_ari> should it look for either of those matches in the query?
[01:43:20] <pingboy> man... i can only find one damned message regarding this error i'm seeing.. newly sharded database.. the balancer is croaking on 2.6.10 saying no primary shared configured for db:config
[07:36:15] <OS-16396> Good morning, I was wondering if anyone could help me with some syntax, I am trying to stack some queries together. I know there are ways using $or and $and operators but I wanted to know if it is possible just using an inline query. The query I am running at the moment is collection.find({"$where": "this.Name == 'XXX'" },{'$where':"this.OtherName"=="'1'" })
[08:57:06] <koren> hello! any way make something similar to $each in $addToSet/$push in $group of aggregation framework?
[09:47:52] <techie28> The Unordered bulk would be good to use?
[10:12:36] <KekSi> i'm having trouble logging in with a x509 certificate on a stand alone node with ssl enabled and the user added - i get Error: 18 { ok: 0.0, errmsg: "auth failed", code: 18 }
[10:24:57] <erenburakalic> Hi there, is it allowed to make a Mac OSX App for MongoDB advertisement here?
[10:37:19] <joannac> erenburakalic: free or paid? open source or closed source?
[10:38:23] <erenburakalic> a pro version with paid (for specially donation), a free version and opensource version in github
[10:39:09] <techie28> can a "findAndModify" operation be used in "Bulk"?
[10:40:04] <erenburakalic> joannac i mean all version will be exist
[10:51:16] <cheeser> techie28: you can update many yes.
[10:52:07] <techie28> cheeser: I want to match the email address with existing records and add if it is non existent.
[10:52:27] <OS-16396> Heya, I am new to mongo db. I was wondering if syntactically something like the following should work? collection.find({"$where": "this.Name == 'XXX'||function() {return "test"} ||'YYY'"). I have tried it when I know I have results for Name=test but didn't get anything back
[10:52:56] <techie28> how is the best to achieve this?
[10:53:02] <cheeser> that's just an upsert not even necessiarly a findAndModify
[10:53:39] <cheeser> OS-16396: $where is discouraged i believe
[10:55:48] <koren> since awesome support is here I'll ask again about $each in aggregation framework
[10:55:58] <koren> any way make something similar to $each in $addToSet/$push in $group of aggregation framework?
[10:59:38] <OS-16396> thanks cheeser, will look into why that is. The main thing I am trying to get right is the running a function in there. If i do collection.find({"$where": "this.Name == 'XXX'||true||'YYY'") I get a full result set while if I do collection.find({"$where": "this.Name == 'XXX'||function() {return true} ||'YYY'") I get nothing so I think I am doing something wrong there
[11:00:07] <techie28> cheeser: Bulk.find(<query>).upsert().update(<update>); will do?..
[11:00:24] <cheeser> OS-16396: iirc, it's because $where bypasses any indexing since it's essentially a js block that gets applied to each document in the collection
[11:00:46] <cheeser> techie28: hrm. not sure about that one.
[11:01:14] <techie28> then how do you suggest please?
[11:02:25] <cheeser> i could take a stab with the java driver API if that'd help at all. but it'll be a bit before I get that chance. have to get the kids off to school...
[11:03:01] <techie28> cheeser:There is a dataset with email and other data in it.. I have to find if the email exist in the collection.. if it doesnt then add the email and other dataset to the collection else not
[11:03:18] <koren> cheeser: I have an array of subdocuments into a document that is $group-ed, and I want to return an array filled with unique values from a field contained in the array of subdocuments, inside the $group-ed items
[11:06:22] <koren> (and addToSet on the array without each does append multiple arrays of values (as expected) and I had big trouble unwinding this)
[11:10:13] <koren> (and since its multiple arrays, uniqueness is not kept accross events)
[11:10:56] <koren> is there a reason why $each can't be used inside aggregation framework? or is it planned in future versions of mongo?
[11:11:28] <Siyfion> Am I right in thinking that the new v2.x Mongo Ruby driver, has no form of "find_one" method?
[11:12:01] <Siyfion> ie. I'm forced to do "client[:artists].find(:name => 'Flying Lotus').limit(1)"
[11:12:06] <KekSi> what a stupid-ass problem that was just there -- apparently i was always connecting as a cluster member (certificate was ok by those requirements but not the ones for a client doing x509 authentication)
[15:12:18] <RedWraith> StephenLynx, I know there are criticisms of it, but it's perfectly clear to me what's going on. I use an IDE so indentation-based languages work quite well for me.
[15:12:30] <RedWraith> StephenLynx, what do you mean? find() vs findOne()?
[15:17:34] <koren> {$createdBy: {$ne: userId}, 'votes.createdBy': {$ne: userId}} I think you dont need the elemMatch since using $ne
[15:17:42] <StephenLynx> I find it amazing how much web developers like bad languages.
[15:17:48] <StephenLynx> everyone is trying to move away from stuff like PHP
[15:17:57] <StephenLynx> and BAM, they come up stuff even worse like coffeescript.
[15:18:20] <koren> StephenLynx: you know some people are working and they don't have choice sometimes, you don't know why he uses that stop being a dick
[15:20:48] <RedWraith> StephenLynx, what's so bad about CoffeeScript? I'm from the Java world originally and my coworker requested we use it because it makes code more legible. Thus far, I've seen him proven right (JavaScript loves brackets like Java loves parens). Then again, without an IDE, I'd imagine this language would be maddeningly difficult to use for exactly the same reasons Python would be.
[15:21:22] <StephenLynx> because you are just adding overhead by needing a transpiler.
[15:21:29] <koren> don't even argue, he will fight whatever he don't use/like
[15:21:52] <StephenLynx> you are using js in your deploy, but now you have to transpile and in the process you are increasing the learning curve.
[15:22:20] <StephenLynx> because knowing js is not enough, now you have to know this small-time thing too to handle the code.
[15:22:24] <StephenLynx> and not always you will have an IDE.
[15:23:08] <StephenLynx> koren, don't make assumptions on what I will fight or not. I don't use Go and I would still recommend for a given scenario.
[15:23:35] <StephenLynx> and RedWraith, I came from a java background and had zero issues with js.
[15:23:59] <StephenLynx> people are just making lame excuses and adding bloat to projects for not reason
[15:25:06] <RedWraith> StephenLynx, fair enough - I'm sure it's an issue for newer developers. This is a project with a small team though. And even before I learned coffeescript, I preferred reading code in it. It's definitely clearer, at least from my perspective.
[15:25:08] <StephenLynx> if people were to just do their homework instead of being dumb apes, they would just slap strict mode and move along with js.
[15:36:17] <StephenLynx> LynxChan is my current project.
[15:36:43] <RedWraith> StephenLynx, if it's easier to read and write for you and for your particular application, that's what's important. JS doesn't provide actual code benefits over coffeescript - the only differences are semantic. Many people find using tabs to be cleaner. If you don't, that's your business. I personally find unnecessary brackets and parentheses to be something of an inconvenience.
[15:36:46] <StephenLynx> LynxHub is not bad either, but I have improved upon it's style.
[15:37:01] <StephenLynx> the problem is those two facts I stated.
[15:37:20] <StephenLynx> which yours are wrong, btw.
[15:38:24] <RedWraith> StephenLynx, your facts are the reason the only difference is semantic. Though, I've never personally experienced a bug because of coffeescript -> javascript transpilation.
[15:45:48] <RedWraith> StephenLynx, Meteor is more than a framework. It lets you use the same code for the frontend as you use on the backend. Also, it simulates the backend with minimongo on the frontend. Other nice things as well.
[15:45:52] <StephenLynx> great the left side of my head st died
[15:47:03] <StephenLynx> and if your front-end is not web
[15:47:16] <StephenLynx> then I can't see how is even possible to use same code on both ends
[15:47:20] <koren> when you have npm I don't see the use of metor, realy. need to do something?npm install something
[15:47:25] <StephenLynx> what if your FE is a native windows phone app?
[15:47:42] <StephenLynx> yeah, I use npm to automatically install dependencies.
[15:47:56] <StephenLynx> I have a package.json that you just run npm install and bam, all deps are in place.
[15:48:11] <koren> everyone does this even with meteor
[15:48:14] <StephenLynx> I repeat: meteor is cancer coded.
[15:48:55] <StephenLynx> if people were to actually LEARN what they are doing, they would stop using 90% of popular web tools in existence.
[15:49:53] <StephenLynx> and they wouldn't end up with unmaintainable crap projects bloated with two dozens of dependencies.
[15:50:20] <StephenLynx> that require a whole server farm to handle a dozen users.
[15:50:31] <RedWraith> StephenLynx, the main point of Meteor, from what I've used so far, is that it automatically updates the client without having to use any sort of event code, including dependencies and does it hierarchically.
[15:51:06] <StephenLynx> sending info back-and forth with the client is baby tier task.
[15:51:13] <StephenLynx> if you need a whole framework for that, people, leave the industry.
[15:51:26] <StephenLynx> brb, my phone died, going to buy a new one
[15:51:27] <RedWraith> I don't like writing boilerplate code.
[15:51:34] <StephenLynx> you don't like programming.
[15:52:29] <koren> StephenLynx: you come from java come on, you had jee whats the difference you used a whole massive framework. you don't liked programming back then?
[15:53:35] <StephenLynx> and I never used a whole massive framework, I used some elements from the standard SDK. which in turn, I must say its bloated as hell.
[15:53:35] <koren> http://en.wikipedia.org/wiki/Java_Platform,_Enterprise_Edition what comes with the jdk/jre
[15:53:51] <StephenLynx> I never used one thing that did everything.
[15:54:14] <StephenLynx> needed a guy? swing. needed arrays? arraylist.
[15:54:20] <RedWraith> Also, StephenLynx, you're quite right to say I don't like programming. Ideally, any piece of software I write is 0 lines of code. I want to write as little code as necessary for my intended effect.
[15:54:33] <koren> same thing with meteor, you need this? require. need this ? require.
[15:54:40] <StephenLynx> again, make the industry a better place and work with something else.
[15:55:05] <StephenLynx> srsly now ,I gonna buy a new headphone
[15:55:18] <koren> StephenLynx: you said you use android studio, make the industry a better place and stop using it... oh wait
[17:22:15] <deathanchor> anyone ever experience issues with mongo not returning the same results for the same query (assuming no updates to the items being queried)?
[18:27:17] <arussel> with mongodump, how do you use the --query ? is it just in the case where you dump a single colletion so you pass a query on that collection ?
[18:41:09] <arussel> is there any limit on the size of the query ?
[18:43:01] <cheeser> well, queries are just documents so they can't be larger than 16MB. :)
[18:44:11] <arussel> cheeser: but this is only for a single collection ?
[18:44:37] <arussel> or at least a single document is used to filter out all collections
[20:44:28] <deathanchor> keeger: not recommended though.
[20:52:55] <devenvy> I have a collection called groups with an org_id and name fields. Each org should only have 1 group with a distinct name. Should I just add a check in the application or create a unique index on those 2 fields?
[21:21:56] <daveaway> anyone got a noob proof windows 7 installation and run
[21:22:31] <daveaway> also, all the thingies i see have mongo/bin and mine is mongo/server/3.0/bin
[21:32:45] <techie28> bulk.find({enable:"D"}).upsert().update({$setOnInsert:{status:"I",points:"0"} });.. is this operation correct if I want to add records when enable = D is not found.
[21:37:29] <techie28> if that is right how to stack up bulk db operations while looping over a data array in JS?
[21:46:06] <techie28> can bulk queries be made dynamically?
[23:16:12] <Eduard_Munteanu> Is MongoDB used as a document management system / filesystem replacement for end-users? I'm looking for something like that and I wonder if some web-based interface does it.
[23:16:51] <StephenLynx> gridfs can be used for file storage.
[23:17:03] <StephenLynx> you will just have to code the application, but it isn't too hard.
[23:17:39] <Eduard_Munteanu> Well, I was hoping there was something already done. Like ownCloud, Alfresco or other stuff like that.
[23:18:24] <Eduard_Munteanu> Document-oriented databases / MongoDB seems rather well-suited for this.
[23:39:39] <Eduard_Munteanu> Is there any downside to using a top-level document as root for all documents to get atomicity? Why doesn't MongoDB provide root documents instead of collections?
[23:43:13] <svm_invictvs> With MongoDB/GridFS is the GridFSDBFile instance thread safe?