[00:00:33] <heoa> db.test.findOne() -- works but over just one db.
[01:14:08] <heoa> Is there some command to find db url?
[01:15:56] <joshfinnie> quick question, can you mongodump to CSV file?
[01:17:33] <joshfinnie> nvm, found it. `--csv` and not `--type csv`
[01:34:34] <heoa> Which book would you suggest about MongoDB? Is the O'Reilly book good for beginner?
[01:37:26] <joshfinnie> heoa, what language are you interacting with MongoDB in?
[01:38:12] <heoa> joshfinnie: javascript (or python) -- haven't yet got anything really working so thought to read some book...
[01:39:21] <joshfinnie> heoa, I have read through this one: http://shop.oreilly.com/product/0636920021513.do (Python) with some success
[01:39:28] <joshfinnie> what are you having issues with?
[01:41:01] <heoa> too much material, trying to find some simple demo with: give stuff to some HTML field, store it to mongoDB, alert( get the data from mongoDB), show stuff in HTML markup, etc -- now puzzled by mongoDB, mongoJS, expect, node, nodeJS etc
[02:13:54] <heoa> How can I initialize the db -object in a browser?
[02:20:51] <joshfinnie> heoa, not sure. I am really green when it comes to mongodb and js. I am sure there might be someone here to better help you, unfortunately.
[02:37:32] <dstorrs> holy crap findAndModify is slow. 30_000 entries in collection, indexed. I did 30k iterations of the same FaM in a loop and I had time to go get water, visit the head, and it's not done yet.
[02:38:09] <dstorrs> actually, no, that was only 10k iterations it was trying for.
[04:45:00] <zackattack> So, while typing this command, I screwed up and somehow lost my database. What should I do? db.copyDatabase('log-p', 'logp', 'localhost')
[05:05:07] <webjoe> Note: these options are only available in MongoDB version 1.1 and later.
[05:05:08] <webjoe> This will fork the Mongo server and redirect its output to a logfile. As with --dbpath, you must create the log path yourself, Mongo will not create parent directories for you.
[05:22:42] <Kane`> in the mongodb shell, if i do: `result = db.collection.find()` how can i then do something like: `db.foobar.find({field: {'$in': result}})` ?
[05:40:06] <dstorrs> just confirming -- 'update' is atomic between its "match" and "do the update" steps, right?
[05:52:29] <kuzushi> im sorry to be a bit of a bum-- but does mongodb have some default logging so I can see queries that are being executed?
[06:43:23] <boll> heoa: I was actually referring to Node.js (the server/framework) rathern than the driver
[06:43:39] <boll> we've been experimenting with it, and wow, does it crash a lot
[06:45:49] <heoa> boll: I see I am going with Narwhal, misread things, it is based on Java -driver that has more support -- anyway, probably good enough, testing.
[06:48:20] <heoa> Cannot yet understand how to execute the code there https://github.com/sergi/narwhal-mongodb/blob/master/tests/DBTest.js <--- is node/mongo/mongod/xyz or something else meant for the execution?
[06:50:56] <heoa> I need some interpreter to do it, something on console?
[06:54:43] <ro_st> any special considerations when storing ObjectIds from a different database?
[07:00:33] <carsten> http://www.catb.org/~esr/faqs/smart-questions.html first
[07:03:31] <ro_st> i have a single database with customers, products, posts, comments etc. then i have an inordinately large collection, analytics. i want to put that into a separate database so that i can make working with the rest of the database easy (in terms of fetching dumps to my development box, stuff like that). however, the analytics collection stores object id's of both customers and products (as it records actions taken by customers on products)
[07:05:52] <ro_st> it's just a sanity-check with more experienced folks before i pull the trigger :-)
[09:02:11] <sylvinus> with the node driver, how to convert a json string (with {$oid}s) to a query object with ObjectId()s ?
[09:09:43] <horseT> Derick: using slaveOkay phpdriver determine the node using ping, it's not a solution. If I directly connect to the secondary I lost the failover.
[09:10:25] <Derick> no, slaveOkay on a non-replicaset activated connection will just work
[09:10:31] <Derick> you need to call it on the cursor object
[09:44:29] <horseT> Derick: What do you mean by "non-replicaset activated connection" ?
[09:47:09] <horseT> slaveOkay has no sense without replicatSet
[09:52:53] <Derick> horseT: if you do: new Mongo("secondary"); it will not use a replicaset (as you don't specify array( 'replicaSet' => 'name' ) ;
[09:53:03] <Derick> you will still have to use slaveOkay on the find:
[09:53:17] <Derick> $c->find()->slaveOkay(); in order to do queries on it
[09:59:00] <millun> just wanna make sure: @Entity("animals") Cat extends Animal { ... } - if i wanted to have ds.find(Animal.class) in one DAO class, and have List<? extends Animal> filled with Cat.class, or Dog.class I wouldn't be able to mix it into 1 DAO file, right? i have to create 3 DAO's
[10:02:30] <spillere> does anyone have a example on running a FOR to populate an subitem on a db in python? like {'name':'daniel', 'sub': [{'n': 'lo'},{'n': 'la'}]}
[10:06:32] <millun> carsten: pardon my noobness, but i still would have to use "ds.createQuery(Animal.class)" which would result in getting only Animals, not extended Cats or Dogs?
[10:07:49] <carsten> go away with your ODM or DAO mappers or whatever ...try it with the native query api and understand what you are doing first instead of building on high-level patters without knowing mongodb
[10:10:37] <horseT> Derick: Thanks, I understand know :). But the solution remove the failover.
[10:43:02] <spillere> I have a dict like this: dic = {'name': 'daniel', 'checkins':[{'ckName': 'Mc', 'ckId': 1}, {'ckName': 'Bk', 'ckId': 2}]}, how do I add a new item to checkins?
[11:06:23] <sepehr> Hi guys, I imported a mysql table into mongodb as a collection which already has ObjectIds (varchar). How can I alter the type to ObjectId? (varchar => ObjectId)
[13:22:29] <philnate> can I somehow do a listDatabase without authentication, while auth is turned on?
[13:23:50] <philnate> actually my java app throws me an error that I need to login, but I may not know to authenticate against which db in the first place
[13:33:13] <philnate> am I able to use listDatabase at all as soon as auth is activated? Or can I use it only if I'm authenticated against the admin database?
[14:07:57] <multi_io> what's the conceptual difference between the update command and the findAndModify command?
[14:08:18] <multi_io> looks like the latter is just a more sophisticated version of the former?
[14:08:50] <multi_io> i.e. update also finds a modifies documents.
[14:08:52] <rick446> findAndModify returns the modified document
[14:09:01] <rick446> (or the document before modification)
[14:18:34] <zdunn> Anyone have experience with the 10gen Chef Cookbook? In particular, sharding and replicasets ?
[14:18:52] <zdunn> I am having a good bit of trouble getting things to act as I would expect
[14:19:04] <zdunn> I have 9 Mongods that I am trying to run in three shards
[14:19:26] <zdunn> I have three roles (shard(1-3)) which have the shard and replicatset recipes in them
[14:19:54] <zdunn> I set the default_attributes in each role to be the shard_name and replicaset_name
[14:20:13] <zdunn> but only shard one starts a "shard" service
[14:20:42] <zdunn> the other two start the standard mongod service but with the correct --replSet defined
[14:20:53] <zdunn> the shard1 just gets the default --replSet rs_shard1
[14:26:30] <philnate> multi_io: findAndModify is synchronous, while update per default isn't. Further findAndModify can only edit one document at most while update can multi update
[14:28:00] <philnate> zdunn: not sure if I understand you correctly but each node has to be told to what replSet it belongs
[14:38:04] <icedstitch> i was landed with mongodb in my lap, taking over for someone else who left the project in my hands. It's being used as a huge storage mechanism, I've considered using the map/reduce in some aspects to speed up the calculations.
[14:38:58] <skeeved> doing an upsert with modifiers and non-modifiers is not allowed?
[14:38:59] <kali> icedstitch: be aware you can only have one m/r job running at a given time
[14:39:09] <kali> skeeved: nope. but you can use the $set modifier
[14:39:45] <skeeved> kali: that makes sense, thanks
[14:42:00] <icedstitch> right, meaning that the 2nd m/r job has to wait for the lock to be cleared
[14:42:16] <icedstitch> as how i've read the docs, is that right?
[14:42:50] <kali> icedstitch: i'm not sure if the second waits or if they intersped, but yeah, this is the basic idea
[14:55:10] <icedstitch> kali: much thanks. Are you aware of what the typical stable release cycle is with 10gen and the mongo server core?
[14:58:49] <Killerguy> is it possible to force removing shard?
[14:58:58] <Killerguy> because mine is stuck in draining status
[15:34:16] <Killerguy> <Killerguy> is it possible to force removing shard?
[15:34:16] <Killerguy> <Killerguy> because mine is stuck in draining status
[18:33:19] <zirpu> anyone know of a good way to determine optimal batch size for inserts? i'm parsing and importing logs, trying to make it go faster.
[18:33:35] <zirpu> faster w/o overrunning the oplog size though.
[19:04:02] <Ilja> hi, is MongoDB supports archivating data on-line?
[19:48:42] <gustav_> Question: We have a sharded setup and running a sum to find the number of embedded documents returns the wrong result. It appears to be returning the sum based off of only a single shard (we have 3). Is there a way to get around this?
[20:40:30] <zirpu> skot: some mongostat numbers. http://pastie.org/4088373
[20:41:02] <zirpu> i've reduced the insert batches to 100 from 10k and 1k. seems to not have made much of a difference.
[20:46:10] <zirpu> http://pastie.org/4088407 some iostat numbers from the primary.
[21:08:18] <skot> zirpu: can you install munin-node and enable MMS to use it to collect hardware stats on your servers?
[21:08:31] <dstorrs> hey all. I'm trying to wrap my head around 'update' + '$elemMatch' and having little success. I tried this: > db.jobs_harvest_Video.update({pages: {"$elemMatch": {lock_until: 0}}}, { $set : { lock_until:10} })
[21:08:39] <dstorrs> The documents are here: http://pastie.org/4088513
[22:31:33] <tystr> without the index, the update is practically instant
[22:54:23] <themoebius> I have a database with a lot of deleted data and I would like to reclaim the disk space that was taken up. I understand the only way to do this is with a repairDatabase() but it requires enough free space to hold the entire NEW database as well as the old. I don't have enough. What are my options?
[22:55:57] <mediocretes> if you can attach more disk, you can repair into a seperate directory
[22:56:56] <mediocretes> if you have a replica set, you can resync
[23:01:30] <Kage`> Stupid question... Anyone know of any PHP+MongoDB forums systems?
[23:24:20] <dstorrs> I have a document that looks like this: { _id : 'foo', pages : [ {n : 1, owner : 'me'}, {n:2, owner:'you'} ] }. I would like to retrieve just the {n:2, owner:'you'} embedded doc. Is there a way to do that?
[23:24:40] <dstorrs> I feel like I should be able to make this work, but I don't quite grok embedded docs yet.
[23:27:55] <themoebius> it seems like when mongodb is estimating the space needed for a repair it uses the current size on disk, not the space actually needed fi I have deleted most of the data. This is a problem if I can't add a drive bigger than the one I already have.