PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Saturday the 31st of January, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:50:50] <ddod> This is a node question, but it's specific to mongo (and particularly the node native mongo module): I'm trying to wrap my head around how to modularize my code. Should I be sending a collection to a module, sending the whole db, opening the db pool and collection directly in the module, or something else? If I'm sending the collection or db object, do I still need to require the mongo module in my module or just in the app that originally o
[01:54:39] <davidcsi> hello all, I'm trying to create an update using a variable like so: var queryAnd = " $and: [{ "name": "David" },{ "lastname": "Whatever"} ] "; db.test.update({ queryAnd },{ ... }); is this even possible? Doesn't work for me
[01:56:27] <davidcsi> http://pastebin.com/8usxYEwi
[01:58:40] <davidcsi> anyone up?
[03:09:27] <Diegao> hi
[03:09:38] <Diegao> anyone that uses mongoengine in python with tests
[08:08:10] <fred-fri> i need to store lesson plans with titles, description and optional files like images, pdfs etc
[08:08:43] <fred-fri> is storing the files in the file system and saving only pointers to them in mongodb frowned upon?
[11:16:18] <Exagone313> hello, i've a porblem with the installation of mongodb on ubuntu server 14.04 using http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/ , when i execute the command to add the gpg key, it is ignored
[11:24:10] <Exagone313> finally, i use the official repo
[12:42:49] <appledash> Hi, I'm looking to do something that I'm not really sure how to do
[12:43:13] <appledash> I want to perform an update where I $pull an array of items from an array in the effected document
[12:43:21] <appledash> But I want the matching to be ignore case (they're all strings)
[12:43:25] <appledash> How could I go about doing this
[12:43:26] <appledash> ?
[13:27:14] <kexmex> appledash
[13:27:16] <kexmex> use regexp
[13:27:56] <kexmex> oh i dunno if you can do that with arrays hto
[13:28:10] <kexmex> but regex wud look like myfield : /matchme/i
[13:28:46] <appledash> kexmex: I know about using regexp
[13:28:52] <kexmex> oh ok
[13:28:56] <appledash> But I need to do what I said
[13:29:01] <appledash> And I can't use regex like that
[13:29:17] <kexmex> ehh
[13:32:35] <appledash> I want to say have a document like {"name": "appledash", "tags": ["Things", "stuff", "OTHER"]} and then somehow $pull out ["tHiNgS", "STUFF"] and end up with {"name": "appledash", "tags": ["OTHER"]}
[13:36:41] <kexmex> yeh
[13:36:43] <kexmex> appledash: sucks :)
[13:37:01] <kexmex> you cant just have everything lowercase?
[13:38:10] <appledash> I cannot.
[13:38:56] <appledash> Because this is user input here, users can add tags to themselves with whatever case they please, and they can remove them with a different case if they want, but tags MUST be displayed in the same casing they were entered
[13:39:05] <appledash> I feel like there is a way to do this
[13:39:21] <appledash> I could always just do multiple $pulls with regex
[13:39:24] <appledash> But I want to mak it cleaner
[13:42:32] <kexmex> might just have to do it in the app layer
[13:43:06] <appledash> That's what I mean
[13:43:09] <appledash> Also, make*
[13:43:46] <kexmex> so this is for users when they wanna remoe tags right
[13:44:03] <kexmex> well you can do something crazy
[13:44:37] <kexmex> tags : [ {"other" : "OTHER"}, { "first" : "fIRST" } ]
[13:44:38] <kexmex> :)
[13:45:55] <kexmex> that might cause an issue with dupes hto
[13:45:58] <kexmex> though*
[13:46:11] <appledash> Yeah, I thought of that as an option
[13:46:15] <appledash> But it's a bit weird yeah
[13:46:23] <kexmex> or
[13:46:39] <kexmex> oh hm nm about the "or"
[13:46:46] <appledash> OK
[13:46:47] <kexmex> appledash: trade space for speed
[13:46:47] <kexmex> etc
[13:47:07] <kexmex> why not pull the whole tags array to app layer
[13:47:08] <appledash> Speed doesn't really matter
[13:47:11] <kexmex> modify it, and write the whole thing back
[13:47:22] <appledash> I guess that is definitely possible
[13:47:22] <kexmex> like SSD drives do :)
[13:47:26] <appledash> I just like clean code
[13:47:54] <kexmex> but what you want to do is more complex
[13:48:12] <kexmex> than read/modify/write
[13:48:58] <kexmex> i am guessing this kinda stuff doesn't have to be synchronous, so if you have issues with perf, you could always have a queue that processes this stuff and then changes eventually show up :)
[15:26:10] <Pathum> Hi Anyone here ?
[15:26:21] <NoOutlet> Sure.
[15:27:00] <Pathum> Posted a question on StackOverflow :( And I need your help
[15:27:01] <Pathum> Cannot query over 330k records from mongodb using c++
[15:27:08] <Pathum> http://stackoverflow.com/questions/28085130/cannot-query-over-330k-records-from-mongodb-using-c
[15:27:23] <Pathum> 2015-01-22T16:57:59.848+0800 Assertion: 13111:field not found, expected type 7
[15:27:43] <NoOutlet> I've actually responded to that question with a comment already.
[15:28:15] <Pathum> Omg its you :D
[15:29:34] <NoOutlet> Okay....
[17:24:19] <Zelest> Derick, just found your blog on php.net while reading up on strtotime('+1 month') .. :D
[17:24:24] <Zelest> Derick, thanks :D
[22:37:21] <ajitam> hi, question - I'm using $all : [tag1, tag2] to find some todo-s, but now I would like to find todos with "tag1" and "tag2" BUT exclude todos with "tag3"
[22:54:02] <NoOutlet> ajitam: db.coll.find({tags: {$all: ["tag1", "tag2"], $nin: ["tag3"]} })
[22:55:02] <ajitam> the!, I was using $ne !
[22:55:06] <ajitam> thx
[22:56:27] <NoOutlet> One of the best things about MongoDB is how easy it is to set up a quick collection to test advice you want to give.