PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 21st of July, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:11:00] <bjori> w3pm: I don't think the erlang driver was ever maintained by 10gen
[00:14:33] <w3pm> bjori: the github is owned by Christian Kvalheim who appears to be a 10gen employee
[00:14:51] <w3pm> though it's unclear what that means exactly
[00:18:09] <bjori> he is.. actually even my tech lead or something like that :)
[00:18:32] <bjori> iit seems to be a bit outdated though
[00:19:04] <bjori> seems to be more in maintenence mode then development
[04:43:22] <jtomasrl> if i have this query "db.stores.find({ _id: ObjectId(store_id), "items.category": category })" and fails becouse no items with category == category where found, but store with _id == ObjectId(store_id) exists, can i say that store exists?
[05:07:09] <makkalot> hi, i'm designing a system where i want to have dynamic groups of my users, lets say i want a group where people are in age 16, and when they become age 17 i want they to move in another group automatically. Can someone suggest how to design my documents ?
[09:45:02] <zhtx> hi
[09:45:18] <zhtx> is this the right channel for libbson?
[11:47:01] <LambdaDusk> my situation: I have a collection of users with names, and another collection of posts, and I want to find mentions of users' names in the posts and build up a sociograph from that, is that possible with mapReduce?
[11:55:27] <ahershko> Anyone up for a question on aggregation?
[13:31:14] <Mkop> I am new to mongo, and have some questions. I imagine this is a good place to ask?
[13:32:38] <kexmex> mkop
[13:32:39] <kexmex> sup
[13:33:39] <Mkop> one thing that is "bugging" me a bit: let's say I have an object user: {name: "John", history: ["event 1", "event 2",...], ...}. in a SQL database, when I want to add a history item, I just need to insert to the user_history table. I know that nothing can possibly mess up the user himself since I'm not touching that table. with a document store, I will do user.history.push("event 3"); user.save(); which means that the whole user is getting overwritten o
[13:33:39] <Mkop> n disk
[13:34:40] <Mkop> I understand that there are other safeguards (in my code, etc) to make sure that I don't corrupt the whole user, but it seems to me like this is one assurance that SQL provides that noSQL doesn't. am I wrong on this?
[13:44:58] <kali> Mkop: what kind of issue are you implying ?
[13:48:13] <Mkop> kali: not issue per se. just that as I was thinking through the differences between (no|SQL), I realized that this is one potential source of danger, and wanted to hear if I am wrong for some reason.
[13:50:20] <Mkop> or let me ask this differently. if I only want to update certain properties of an object, or if I only want to append to arrays rather than update values, or whatever, is there any kind of security layer I can use to prevent a rogue line of code from doing what I don't want?
[13:50:52] <kali> well, that's more or less what the atomic operators do for you
[13:52:06] <kali> actually, "rogue" locs are much more dangerous is SQL code, if you want my opinion
[13:52:44] <kali> specifically with user inputs and sql injection
[13:53:20] <Mkop> different kinds of danger. a single SQL "DELETE" with a forgetten where clause will kill your entire database.
[13:53:34] <Mkop> and yes, there's the whole SQLi danger.
[13:54:47] <Mkop> I'm not here to say that "mongo sucks because it's dangerous". that would be a dumb thing to say. but in many ways, I already know how to mitigate the dangers of SQL, and I don't *yet* know how to mitigate the dangers of noSQL.
[13:55:11] <Mkop> I haven't read up on atomic operators. (or at least not with that terminology). I will google.
[13:55:23] <kali> Mkop: $push, $set, etc
[13:55:27] <CIDIC> anyone familiar with mongodb with php?
[13:56:07] <CIDIC> I am just trying to get it up and running. I have the shell working and the php working but they dont' seem to be connected to the same db? when I make changes in one I dont see them in the other
[13:57:14] <kali> CIDIC: show us the code (i have't use php since the previous millenary, but somebody else may be able to help)
[13:57:42] <CIDIC> I just coppied this
[13:57:42] <CIDIC> http://www.php.net/manual/en/mongo.tutorial.php
[13:57:47] <CIDIC> then tried to do a find() from the shell
[13:58:06] <CIDIC> it seems that from the shell I can see the dbs that were created by php but not the records and vise versa
[13:58:26] <kali> CIDIC: show me what you're doing in the shell then
[14:00:24] <CIDIC> kali: I think I see where I am missing something in the php example it creates the db "comedy" then the collection "cartoons" (it seems in that db?)
[14:00:55] <CIDIC> when I do show dbs I see cartoons 0.203125GB, comedy 0.203125GB
[14:01:27] <CIDIC> when I do db.comedy.find() I get nothing
[14:01:34] <CIDIC> from the shell
[14:03:30] <CIDIC> I can't seem to be able to drop them either hum
[14:03:39] <CIDIC> it returns false then they still showup
[14:05:00] <kali> CIDIC: "use comedy" will switch you in the comedy db. then "db.cartoons.find()" will list the cartoons collection
[14:05:24] <CIDIC> ah
[14:05:45] <CIDIC> so you can't do db.cartoons.comedy.find() ?
[14:05:53] <kali> please start there: http://docs.mongodb.org/manual/tutorial/getting-started/
[14:30:22] <CIDIC> how much of a performance hit is it to use 2 queries instead of 1?
[16:52:21] <knail> Hi!
[16:52:58] <knail> I had a question around building a mongoDB schema and embedding an image as one of the key: value pair within the document
[16:53:44] <knail> does anyone have any examples I can look at?
[16:54:49] <kali> knail: use a bson binary.
[17:02:26] <knail> kali, thanks. i'm assuming i can keep the rest of the documnet's key:values all text, and just change one key:value pair to "image":<actual jpg>
[17:05:28] <kali> yeah, just use a bson binary field for the jpeg
[17:07:33] <knail> ok cool! thanks kali
[17:43:31] <knail> another one: I need to insert future dates associated with certain activities (time of day not necessary, just a day is fine). the app will need to check if it has hit that date, at which time it has to carry out certain actions
[17:43:59] <knail> what would be a good approach. save the date as "mm/dd/yyyy" or as timeticks?
[17:46:14] <kali> knail: use the bson datetime
[17:46:57] <knail> ok thanks will look that up
[19:40:05] <tpayne> anyone here use scala
[20:05:37] <tpayne> Is it common to convert a WriteResult into a DBObject?
[20:10:47] <Guest18536> hey guys, i'm getting the error message "no such cmd: text" when I run this command $ db.collection.runCommand("text", {search: "submission"} ); Any ideas on how to fix it?
[20:11:44] <LesTR> Guest18536: New in version 2.4 viz http://docs.mongodb.org/manual/reference/command/text/
[20:11:50] <LesTR> whats your version?
[20:13:13] <Guest18536> LesTR, well, the mongo command returned version 2.24 so I guess that's it..
[20:13:29] <LesTR> yeeah
[20:23:52] <Guest18536> What options does one have for performing text searches with version <2.4?
[23:20:43] <kesor> before I add keyFile in a sharded cluster, do I need to create an admin user on each of the shards and replicas or just on one mongos?