[00:52:58] <lastk> hi guys, i have this object: {'title': "Hello", 'posts': [{'message':'messages'}]} how can i do a update to add a new object to posts ?
[02:12:01] <neeky> azathoth99, you create a replica if you want to backup online, or you dump the database if you can afford to lock it while the dump happens
[02:14:14] <neeky> anyone want to talk schema validation design patterns? I'm trying to decide how to design a schema that will allow user/customer defined validations
[02:15:00] <neeky> i'm currently using mongoose, but use about 1% of what mongoose does, and have about decided I don't need it
[03:10:26] <tpayne> is it a bad idea to use a records _id value as a file name that's associated with it?
[03:25:45] <tpayne> how do i get the new _id associated with a saved document?
[03:43:21] <baegle> I am writing a script to dedupe some data. I have identified 2 records and I would like to strip their IDs and then create a checksum of their string representation. Do I have functions like stringify() and md5() to help me here?
[06:31:34] <k_sze[work]> Out of curiosity: what happens if there is a netsplit among the servers of a replica set?
[06:32:29] <k_sze[work]> e.g. 4 replicat set members: A, B, C, and D. A and B can still talk with each other, C and D can still talk with each other.
[08:53:06] <durre> I'm going to write a newsfeed using mongodb. right now I've decided on "fan out on write". so I write the same object to all users that should see that event. then have an index on userId. how will that scale if there are millions and millions of documents? by doing this way, updating the document is not a good idea I guess?
[09:11:51] <NodeX> durre : can you explain that a little deeper?
[09:15:00] <durre> NodeX: sure. so we have the concept of followers & followees. potentially a user can have _lots_ of followers. Lets say 100 000. when a user performs certain actions the followers should see that. its important that the read of the newsfeed is quick. writing isnt as important but shouldnt be terribly slow either. so how should I model it
[09:16:54] <NodeX> your scale will top out at 16mb if you store followers in the user document
[09:17:26] <durre> I'm storing the followers in a separate collection, not in the user document
[09:19:22] <NodeX> your bottleneck will be that join then
[09:20:27] <n008> ran iotop I have 5 mongod processes running
[09:21:14] <durre> that's more of a "write bottleneck", which is hidden from the user. I basiclly only use the followers to determine who to write the newsfeed events to
[09:22:51] <NodeX> it's a read bottlenek when you need to read the followers the user has following him to fan out to them
[09:25:08] <durre> but the user never reads the followers. its a background job that reads them and then writes the newsfeed events
[09:29:40] <NodeX> it still gets read even if it is a background job
[09:29:53] <k_sze[work]> I'm confused. So the official `mongo` command line client can automatically "detect" and "resolve" the replica set by giving it just one of the servers?
[09:30:40] <k_sze[work]> whereas client libraries like PyMongo need to be specifically told the addresses of all members in the replica set?
[09:31:07] <kali> k_sze[work]: it's just good practise to give all of them when possible, in case the one you're passing is down
[09:31:34] <kali> k_sze[work]: but when connecting, the client retrieves the full list of nodes
[09:33:05] <kali> k_sze[work]: to answer your previous question, an even number of replica in a set is a bad idea, because it allows 50%/50% splits, in case nobody get a majority
[09:33:17] <kali> k_sze[work]: 3 nodes sets are not subject to the problem
[09:34:44] <k_sze[work]> So what's the proper way to specify multiple addresses with the `mongo` command line client?
[09:34:57] <k_sze[work]> the man page's examples are all single host only.
[09:37:34] <k_sze[work]> And how does it tell the difference between a simple replica set and a cluster? (Somehow the pymongo library makes a distinction, with separate classes for MongoClient and MongoReplicaSetClient)
[09:38:03] <k_sze[work]> (but MongoClient is used for both single host and clusters, which is doubly weird.)
[09:39:14] <k_sze[work]> In terms of hierarchy, one would think it goes from single-host -> replica set -> cluster
[09:45:06] <k_sze[work]> Even the latest doc at http://docs.mongodb.org/manual/reference/program/mongo/ doesn't say anything about replica sets or clusters.
[15:45:37] <liquid-silence> Nodex, so if I flag book[0] as deleted I do not want it to be in the result, when I select the product, makes sense?
[15:45:44] <Lipathor> Nodex: and when i restart app again first req is ok, and next empty
[15:46:06] <Nodex> Lipathor : without seeing your code I cannot help you sorry so again good luck to you ;)
[15:46:22] <Nodex> liquid-silence : why don't you just filter it in your app ?
[15:46:47] <liquid-silence> because its an unnecessary payload to send over the wire.
[15:47:43] <Nodex> well mongodb cannot do what you want so you're going to have to
[15:48:56] <Nodex> this is the only chance you have at mongo returning it without the array elements http://docs.mongodb.org/manual/reference/operator/projection/positional/
[15:49:10] <Nodex> best to hope your data structure matches what it needs
[17:30:22] <mongonewbie2387> Hi guys, is there a way to do something like what I'm trying to do here: http://pastie.org/8463181 ? Basically there is an entry in my collection with the field "astring" and it has a value "asdasd(blahasdasdf" and i want to replace the "(" with " ( "
[17:30:53] <mongonewbie2387> the only way ive seen to do this is to iterate over each document, get the value out into a variable and change it, then insert the variable back into the entry
[17:31:00] <mongonewbie2387> i was trying to not do that cause it's very inefficient
[17:40:10] <tomasso> i have a collection with lat and lng values.. im reading on geospatial indexes and found out they use GeoJSON objects, that are like { type : "Point" , coordinates : [ <longitude> , <latitude> ] } . Is there some way to specify my index to use the existing lat and lng keys, and not the GeoJSON point? or I need to convert the collection from lat and lng to GeoJSON point respectively?
[17:58:49] <jpiche> I was hoping to be able to run mongodb on a rasberri pi, but arm isn't supported (see SERVER-1811). It looks like the Scons file for V8 is a big part of what is limiting it, but vanilla V8 compiles just fine on arm. Anyone have any insights?
[18:00:03] <Derick> jpiche: mongodb doesn't run on ARM because we don't support big endian platforms yet
[18:01:47] <jpiche> Derick: I like the "yet". Is that something that's scheduled to be implemented?
[18:02:07] <Derick> I don't think it's high priority, but you never know what the future holds :)
[18:07:30] <jpiche> Derick: really? is there a lot of little endian specific code? When I was looking through the code, it looked to me like the asm blocks might have been the big holdup
[18:07:58] <Derick> yes, but it's not tested anywhere, so you've no idea where bugs might lurk
[19:54:05] <ph88_> in SQL i have a long table and i need to do WHERE Color = green and then get the unique values from the other columns. Would MongoDB be fast at doing this or is it better i stay with SQL ? (it's ok if i need to change data structure)
[21:57:51] <roryhughes> My latest mongodb, node.js, angular.js creation http://imageswaps.tk/