[00:19:21] <halcyon918> when I use a MongoUI and provide a database (mongodb://<user>:<pwd>@<addr>/myDB), how do I get that DB? I tried mongo.getUsedDatabases, but that collection doesn't include my database for some reason. When I do mongo.getDB(myDB), I get the database and have to reauth. So how do I get the DB I authenticated with on connection?
[06:38:29] <DPP> I can't recall how to start a replica member whose other members have barfed.
[06:38:48] <DPP> hoping someone can offer enlightment
[09:12:14] <SeanBannister> When querying the DB is it possible to perform a query and if it isn't matched perform a different query. I could perform and $or which will do booth queries but I only need to perform the second query if the first doesn't match.
[13:10:18] <godawful> DPP: this page any help? http://www.mongodb.org/display/DOCS/Reconfiguring+a+replica+set+when+members+are+down
[13:10:32] <godawful> I just went through that too
[13:10:38] <godawful> AWS outage is destroying my weekend
[13:11:04] <godawful> I've got a replica set with two out of three members down
[13:11:36] <godawful> I reconfiged it to make the surviving member the only one, so that it would take over as primary
[13:11:42] <godawful> now I'm adding back recovered members
[16:11:55] <daveluke> hi, i have an attribute called pos which is like {x: 300, y:200}.. it's the coordinates for a player's position in a game… how do i query for other players who are within X distance from that point?
[16:20:07] <jstout> quick, how can i make my slave become a master again
[16:33:44] <jstout> we haven't looked into replication yet nor are using it… we just released the app and threw a little traffic to it for testing
[16:33:52] <jstout> being hungover and tired and fixing was problems isn't fun :(
[16:40:03] <jstout> anyway, thanks skots, sites back up
[16:40:20] <jstout> tystr --- thanks for waking up douche!
[17:58:18] <kavelot> can anyone give me suggestions on how to store "history"/versioning information with mongo (something like a wiki, which you may need to know who/when changed what)? considering retrieving the most recent information is the most common operation
[18:17:08] <djbpython1> I'm finding that when i store numbers of type Long they arent being stored as NumberLong, is there any way i can force that?
[18:17:19] <djbpython1> this is using the scala driver, which uses the java driver
[18:18:59] <ron> kavelot: well, there a few ways to do it, but one way is to just store a document per version.
[18:22:59] <ron> the basic concepts are the same. no magic involved.
[18:24:05] <kavelot> well, you agree that if I were to save history of only the fields that changed, nosql would have a big advantage in relation to sql? unless you wanted to break your sql in something like a key-value table
[18:24:49] <ron> you could do that, but that would most likely be a poor design.
[18:25:07] <kavelot> that's why i think nosql would make much more sense for this case
[18:25:31] <ron> I meant the part about the saving only the fields that changed being a poor design, not the breaking the sql tables.
[18:26:00] <kavelot> well, another possibility would be to make a version for each field
[18:26:45] <ron> what would you gain by saving all the changes in one place?
[18:27:33] <kavelot> the question is "what would you gain by not saving the whole document after each change?", which would be disk space
[18:28:04] <ron> one of the main concepts behind nosql is that disk space is cheap and data duplication leads to better performance.
[18:28:23] <ron> once you start toying with that, you'd better go back to sql.
[18:28:54] <ron> it's actually one of the reasons nosql databases failed in the 70's and prior to that. disk space was MIGHTY expensive.
[18:29:47] <kavelot> i'm trying to think on an advantage I'd have to use nosql instead sql in this sceneario... ie, I could create a table with columns "last_updated", "by_whom" and all the field values
[18:30:57] <ron> well, without going into specifics, that would be difficult to say.
[19:14:31] <SkramX> for a super fast mongodb instance
[19:14:35] <SkramX> do i need as much memory as i have data?
[19:23:34] <Derick> but you really only need as much memory as your *working* data set takes
[19:25:01] <ron> otherwise you can just use an in-memory database ;)
[19:25:57] <ron> I should read more about the mechanics of MongoDB some time. I'm pretty familiar with how Cassandra manages its memory and disk access, should be interesting to learn MongoDB's as well.
[19:26:27] <Derick> MongoDB doesn't really... it leaves it to the OS
[19:27:22] <ron> well, I imagine there is some sort of caching mechanism though, no?
[19:29:39] <Derick> mongodb operates directly on the memory mapped files on disk
[19:29:52] <ron> Oh, should have realized that. Sorry.
[19:32:18] <SkramX> if i backup often.. im trying to figure out if i should use ephemeral disks on Amazon or EBS
[19:32:40] <SkramX> ephemeral would be faster and better for mongo from what I can rationalize but the quickstart uses EBS
[21:25:01] <jarmstrong> i'm storing user-following-user as an array of ObjectId's, but I really also need to save the date when this occurred - should I just change array to be { date, user_id } which means when I want to do an $in query i'll have to build the array myself. Ideas?
[22:14:42] <massctrl> in pymongo is there a way to query a certain collection of which the depth is unknown in advance? getCollection doesn't seem to exist in pymongo
[23:46:02] <multiHYP> in java, I have this document: {"date":"20120630", "things":[]} and when I do a findOne() and cursor.get("things"); I cannot proceed, because the array is empty. so what should I compare it against?
[23:47:09] <multiHYP> cursor.get("date") gives me correct date, but what about cursor.get("things") ???