[07:33:21] <MasterGberry> hi. i have a quick question about indexes. do they behave simularly as in mysql? and do you force on creation of a collection? of during insert time?
[07:40:41] <MasterGberry> guess everyone is asleep. ill check logs in morning if someone could leave a response. thanks
[08:31:09] <kali> MasterGberry: yes, mongodb index are roughly what you would expect coming from sql. creating an index on a non existing collection will create the collection, but creating the index after the collection is seed works too
[08:32:40] <kali> MasterGberry: you want to check out the "background" option, because by default index creation locks everything (not an issue if the collection is empty)
[13:25:34] <msucci> has anyone had success combining text search with geospatial queries / is it even possible
[16:08:44] <MasterGberry> kali: hey are you still around?
[16:11:31] <MasterGberry> How do you create a collection in advanced? From what i understood the collection gets created when you insert a document for the first time.
[16:11:50] <MasterGberry> And what types of indexes are there?
[16:13:01] <MasterGberry> Lastly, there are no joins in mysql. Let's say i'm trying to build a basic private messaging system. I want to have 2 collections (tables). One that lists the participants in a conversation, a unique id for the conversation, and another collection for all of the messages for that conversation. In mongodb is it wiser to nest the second collectino into the first as a sub-column such as "messages"?
[16:13:28] <MasterGberry> Or am i better off keeping them separate? Is it possible to update a subcolumn with new rows? let me link a quick exmaple of what i am talking about
[16:16:57] <MasterGberry> Trying to get the hang of mongodb so I can use it today to start writing an application.
[17:36:27] <MasterGberry> Hey, I am back if anyone wants to take a few minutes to help me understand the questions i mentioned above :)
[17:45:42] <hitul> Anyone have review about mongodb new version ?
[17:51:42] <aandy> hi, this is probably really stupid, but: i'm trying to follow the deployment guide for replication sets, using a (for now) two host setup. both are reachable from each other (as per "connectivity test") but the states don't make sense to me. on box A: rs.initiate(); rs.status() -> stateStr: PRIMARY, rs.add(boxB). box B
[17:52:19] <aandy> whops., cont: .. box B, rs.status(), shows just itself, and supposedly as PRIMARY.
[17:52:55] <aandy> both are part of same rs, but it seems like only one box can see the other, or am i reading it wrong?
[17:53:10] <aandy> shouldn't i be able to see the health of both members from both boxes?
[17:57:07] <aandy> http://pastie.org/private/kpnh2qyy6gw59aik25u6a here's conf + status after initiate and add
[17:57:34] <aandy> it's box b rs.conf output which concerns me
[18:12:02] <sw99> For a new forum webapp, can you give me some reasons for why i should choose mongodb?
[18:12:17] <sw99> it's basically mongodb vs mysql for me
[18:15:13] <aandy> sw99: you mention two non-related database types. you should always choose the db which fits the project's needs (what kind of data to be stored, what type of queries, which demands to backup, bigdata?, etc) http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis
[18:17:56] <sw99> well, for a forum i have posts, replies, users
[18:23:18] <aandy> i'm not the guy to ask. you could structure that in both sql and mongo easily. so a quick off the top of my head, you might prefer mongo because you can set up backup, replication, failure and HA fairly easy, and search options are typically more broad out of the box than mysql (postgres is another case, which has fairly solid fulltext search builtin)
[18:24:23] <sw99> i guess i won't develop a feel for it until i develop a database i mongo
[18:24:33] <sw99> then I will "feel" what i can or can't do
[18:24:39] <sw99> and where mysql would have been nicer
[18:29:08] <aandy> a slight adjustment to your structure: you have posts, users. some posts are replies, and so i'd define them as such (e.g. { replyTo: <some other post id> }, with index on dates and replyTo for quick pull of a "thread" (and sort)
[19:20:19] <mastergberry> What do people normally use when trying to query by a _id as far as the public can see?
[19:20:37] <mastergberry> Is it safe to let the user query via the uuid? aka www.example.com/some/post/{uuid_goes_here}
[19:40:14] <ExxKA> Using Mongoose: When I save a document, and later change it, then save it again - there is no return value the second time. Is this something you have experienced before?
[19:51:45] <sinisa> hi all... should i use distinct on multiple fields to get something like "facets" per phrase with aggregation .. or should i use solr or something.. anyone with experiance?
[19:56:48] <ExxKA> sinisa, what are you trying to achieve?
[19:57:46] <sinisa> im working on some app that should filter things.. like for exact values in multiple fields, and some ranges (prices,dates)
[19:58:19] <sinisa> also depending on query, i should get count on matched values
[19:59:04] <sinisa> like match:query, and return distinct on fields.
[19:59:12] <ExxKA> you can easily do that with mongoDB
[20:00:24] <ExxKA> Technically there is no difference, it is all searching a data set
[20:00:41] <sinisa> you filter by exact value, searching is searching for terms or exact values
[20:01:21] <ExxKA> Right, that is the difference between normal queries and what is known as full text searching.
[20:01:53] <sinisa> however.. on 1 mil documents, and 20 fields to perform distinct.. how would that work , in time speed
[20:02:21] <ExxKA> To answer your question on performance, it will be as good as the index complexity. So if you put indexes on everything it will not necesarrily be faster because you will have a lot of indexes at the same time, that are not needed.
[20:03:09] <ExxKA> in computer science you measure performance a little bit different that seconds, minutes of hours, because that is all dependent on hardware and operating systems.
[20:03:14] <sinisa> hmm.. if you perform distinct on fields.. isnt index required ?
[20:03:25] <ExxKA> I will find you the article you need on wikipedia, just a sec.
[20:05:45] <ExxKA> So the best answer anyone can give you, is try it out. MongoDB will be better than anything you can write yourself, and most likely quicker than relational databases for what you are trying to do
[20:06:16] <sinisa> im long time mongo user.. i do everything in it.. but never have to do something like this
[20:06:37] <ExxKA> sinisa, if you are not willing to put effort into it yourself, you won't find the right answer. Nobody knows your problem like you do yourself, so no one will be able to answer you 100% correctly
[20:07:04] <ExxKA> Right... Maybe I have misunderstood your question.
[20:07:06] <sinisa> i know.. but people test all kind of things.. thats why i ask it
[20:17:22] <ExxKA> mastergberry, the best solution will be to use the uuids, but if you want to create your own primary keys you can, just make sure that there are no collisions. There is documentation on how to do your own primary keys, but It would probably be easier for you to just use something like the email address or title of the blog post as the identifier, if you are doing a web app.
[20:17:27] <sinisa> you update it with findandmodify
[21:43:20] <ixti> does reduce function in map/reduce should return same amount of fields in result object or result should just match same type map emitted?
[21:44:11] <ixti> stupid question i guess. so no answer needed
[21:45:20] <ixti> in fact it's said in docs: the type of the return object must be identical to the type of the value emitted by the map function
[21:45:29] <ixti> so i guess onlty this matters then
[21:58:30] <aandy> any way to figure out which version the mongo-dev files are?
[23:36:43] <Wardrop> With the ruby driver, is it possible to set the write concern option after instantiating the connection? It looks like the write concern can only be given on object instantiation?