[18:29:35] <jaraco> I've added pmxbot to the channel. Logs at http://chat-logs.dcpython.org . pmxbot is also set up to relay twitter messages to the channel. If that turns out to be undesirable or too noisy, don't hesitate to ping me and I'll turn it off.
[18:39:57] <wereHamster> jaraco: then you need to mention the bot in the topic, otherwise it's agaist the freenode TOS
[18:40:08] <wereHamster> or when people join the channel
[18:40:26] <jaraco> The bot will send private messages to people when they join the channel.
[19:05:07] <GRiD> question for core devs: are the error codes in core server/tools assigned in any particular way? i see they are tracked in docs/errors.md
[20:27:45] <infinitiguy> if I require auth on my mongoDB but I'm creating a new database - how do I create the initial user if auth is required?
[20:29:16] <infinitiguy> hrm weird - looks like it just worked for me - maybe i was typing wrong
[20:59:17] <westoque> So I have a field wherein I store immutable JSON data, I was thinking of storing it as flat .json files, it would make it faster for fetching in terms of the http server in contrast to mongodb.. Would you guys still recommend mongodb for my use case? Whats the advantages if I do? Thanks
[21:00:16] <westoque> So I have a field wherein I store immutable JSON data, I was thinking of storing it as flat .json files, it would make it faster for fetching in terms of the http server in contrast to mongodb.. Would you guys still recommend mongodb for my use case? Whats the advantages if I do? Thanks
[21:09:38] <heph_> is there anyone here that can answer a question of mine
[21:11:49] <kchodoro_> heph_: maybe, what's your question?
[21:18:27] <SkramX> i have a map reduce that goes through all objects and extracts the event's location and counts all of them and puts the _id and count (as value) into a new collection. Would I use a finalizer to drop all records where value is less than 5?
[22:01:00] <SkramX> i have a map reduce that goes through all objects and extracts the event's location and counts all of them and puts the _id and count (as value) into a new collection. Would I use a finalizer to drop all records where value is less than 5?
[22:02:24] <zirpubolci> i haven't used mongodb MR yet. but i think that might be right. or just make the reduce use a query for > 5.
[22:03:53] <SkramX> and if all the emits are done on one server.. i think the emits are what take so long so modifying the reduce doesnt really help
[22:04:11] <SkramX> im running on an m2.2xlarge ec2 server with 70gb of data..
[22:04:33] <SkramX> i wish funds were unlimited so i could just keep upgrading the server
[23:05:14] <tystr> how would I query and return only a single document in an array of embedded documents?
[23:05:52] <dstorrs> what are you trying to achieve?
[23:06:18] <tystr> I want to retrieve an embedded document
[23:06:55] <dstorrs> do you want a random document, just to verify something is there? do you want to match a set of criteria? if the latter, what? etc.
[23:09:36] <dstorrs> have you read these? http://www.mongodb.org/display/DOCS/Dot+Notation+(Reaching+into+Objects) and http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-ValueinanEmbeddedObject
[23:10:00] <tystr> yeah, but I am a noob w/ mongodb :)
[23:10:16] <dstorrs> hold one, let me verify something.
[23:10:33] <tystr> and we're porting our app from mysql to mongodb, so I'm still trying to wrap my brain around the whole scheless design thinking
[23:11:36] <tystr> I've embedded these docs b/c usually when showing content to the user I want to pull everything
[23:12:12] <tystr> but when it comes to adding/editing single embedded documents (in the backend, for example) I'm not really sure how to do it, or if I'm going about it the proper way
[23:13:48] <dstorrs> this is where my "what are you trying to achieve" question comes into play. What are these embeddeed docs and why embed them?
[23:14:07] <dstorrs> The more I talk to people on channel, the more it seems that embedding is often a bad design choice
[23:18:52] <dstorrs> again I ask, "why are you embedded docs? what do they represent?"
[23:19:19] <dstorrs> the danger with embedded docs is that they are harder to update, and that unless they have a clearly defined limit, you will eventually blow the 16M doc size
[23:19:47] <dstorrs> (e.g., if you are embedded all the comments / votes / emails a user has made)
[23:20:48] <dstorrs> embedded docs are good for things like "here are all the line items that are part of this invoice"
[23:20:49] <tystr> this is basically a cms type of thing, so I know the document size will not be an issue
[23:21:20] <dstorrs> "cms type of thing" means what?
[23:21:31] <dstorrs> what are the primary docs and what are the embedded docs?
[23:50:58] <callen> it's in production, but I realized I couldn't keep keying across multiple fields of data in the list of embedded documents to identify them
[23:51:06] <callen> so I want to add an objectid or uuid field or something
[23:56:51] <callen> How do you uniquely identify, using something unrelated to the data itself, an embedded document?
[23:56:55] <callen> am I using an objectid or not?
[23:57:39] <dstorrs> first, lose the 'tude. I'm trying to help you, and to do that I need to understand the problem. Often questions like this relate to "the problem goes away if you change the data model", which is why I'm asking.
[23:58:33] <callen> if this was MySQL, I would've known the answer to this ages ago..."just use a guid or pk"
[23:58:40] <callen> so is the answer to use an objectid or a guid?
[23:59:30] <callen> arbitrary list of embedded meal documents, need to uniquely identify them, nothing innate to the data model to do so...leaving me...needing to add something to uniquely identify them
[23:59:35] <callen> the obvious choice is objectid
[23:59:46] <callen> or generating my own guids and hoping for no collisions / checking for collisions.
[23:59:52] <dstorrs> neither one will help you unless there is a 'unique' index on that field.