PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Friday the 8th of June, 2012

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:17:37] <multi_io> ah, you have to add a some documents before enabling sharding, so the database can determine the range of the shard key values?
[01:50:20] <eka> hi all, how to do bulk insert?
[01:59:40] <lqez> eka: Use bulk/batch insert function of driver. Like : http://php.net/manual/en/mongocollection.batchinsert.php
[02:00:29] <eka> lqez: I see... so no special thing... just pass a list of documents and that will do... in the case of python I meam
[02:00:37] <eka> *mean
[02:02:30] <lqez> Yeap, I don't use PyMongo or other python mongo drivers now, but it'll be done by passing documents in list.
[02:02:54] <eka> lqez: thanks
[02:19:26] <tester> Anyone know how to do a string != 'a' and string != 'b'??? i can only string: {$ne: 'a'} but not sure how to do 'b' also
[02:23:20] <lqez> tester: How about{ $and: [{string:{$ne:'a'}},{string:{$ne:'b'}}] } or { string: $ne: [ 'a', 'b' ] }
[02:23:26] <lqez> I didn't test them.
[02:23:42] <lqez> Just guessing :p
[02:39:00] <tester> will try it thanks ;)
[04:00:44] <maodun> I just installed the mongodb ubuntu package - will it by default only accept connections from localhost? if not, how can I configure it to only talk to localhost?
[04:04:04] <maodun> ah, sorry, it looks like this has already been done for me bind_ip = 127.0.0.1
[04:32:48] <carsten> grrrrr.....this bot is still there
[04:32:57] <carsten> perhaps time to boycott this channel
[04:54:42] <carsten> who owns this smelly bot?
[06:08:49] <tk___> anyone know if dropDatabase is blocking?
[06:13:16] <carsten> blocking of course
[07:31:06] <[AD]Turbo> hola
[07:44:52] <henrykim> what the meaning of "locked %" from mongostat?
[07:44:56] <henrykim> global lock percentage?
[07:45:39] <henrykim> If it is true, it's quire weird because sometimes I recognized the percentages over 100.
[07:45:43] <henrykim> quite*
[08:04:01] <ub|k> any clue why '$and' queries are not working in my db?
[08:04:05] <ub|k> always get an empty set
[08:05:08] <carsten> mongodb version?
[08:07:21] <ub|k> carsten: 1.8.2
[08:07:31] <carsten> read the docs :)
[08:07:35] <carsten> read the $and docs
[08:09:24] <ub|k> carsten: oh, right, sorry, i had read the advanced queries docs but the "2.0+" is just too small, i guess i missed it ;)
[08:09:27] <ub|k> thanks!
[08:09:55] <ub|k> damn ubuntu
[09:27:45] <abrkn> Fri Jun 08 11:25:27 TypeError: [1, 2, 3].reduce is not a function (shell):1
[09:27:46] <abrkn> wut?
[13:41:31] <ravana> hello guys.. is there someone who has configured sphinx with mongodb?
[13:45:12] <ravana> guys...
[13:45:14] <ravana> :D
[13:47:16] <NodeX> I had better luck with SOLR
[13:47:19] <carsten> abryou did?
[13:47:33] <ravana> hi NodeX
[13:47:43] <NodeX> some people use elastic search but I found it a bit green for my liking
[13:47:49] <ravana> did u implement is with SOLR?
[13:47:59] <ravana> I see
[13:48:17] <ravana> *it
[13:48:57] <ravana> do you have any recommended tutorial?
[13:49:18] <NodeX> for solr ?
[13:49:21] <ravana> yes
[13:49:31] <ravana> solr+mongodb how to
[13:49:49] <NodeX> http://www.nodex.co.uk/blog/12-03-12/installing-solr-debian-squeeze
[13:50:08] <NodeX> http://www.nodex.co.uk/blog/02-04-12/mongodb-with-solr-
[13:50:15] <NodeX> the second one is my findings
[13:50:38] <ravana> thanks so much!
[13:51:13] <NodeX> I'll update the second post with some new quirks and tips I have picked up on my SOLR travels
[13:51:25] <NodeX> perhaps next week so you might want to check the blog again
[13:51:35] <ravana> do u satisfy about the performance?
[13:51:45] <ravana> yes sure
[13:52:37] <NodeX> I cna search a million docs with a complex query very fast
[13:52:45] <NodeX> about 19ms for the query
[13:53:07] <NodeX> it doesn't scale all that well atm though .. you can cluster it but it's a bit of a pitfa
[13:53:22] <NodeX> elsatic search look promising but it's a bit scatty
[13:55:04] <ravana> :O
[13:55:09] <ravana> thats good
[13:55:18] <ravana> i was reading the blog
[13:55:20] <ravana> :D
[13:55:22] <ravana> ;)
[13:57:11] <ravana> many of my friends recommended SOLR
[13:57:47] <ravana> but I was searching and searching who has implemented and has the experience
[14:06:29] <NodeX> The thing with solr when coming from a k/v or NoSQL store is you'll find the schema restrictive
[14:06:55] <carsten> blabla
[14:08:58] <NodeX> how did you get off my ignore list
[14:09:07] <NodeX> re-added bk
[14:10:02] <carsten> i suggest you read your irc client docs first
[14:13:41] <ravana> thanks NodeX
[14:13:54] <ravana> I was reading some articles ;)
[14:13:59] <ravana> sorry for the delay
[14:14:01] <ravana> ;)
[14:14:46] <NodeX> sa'll good ;)
[14:18:10] <rohanrhu> what is the best mongo managament app?
[14:18:56] <carsten> best is in the eye of the beholder
[14:20:13] <OKAN|3> do u think?
[14:41:22] <drudge\work> rohanrhu: they all suck
[14:43:57] <NodeX> Best to use console/shell tbh - much more flexible
[14:45:09] <carsten> only numpties use the console
[15:38:39] <solars> hey, quick question, I want to map/reduce and retrieve the last record (timestamp) in each group, therefore I have: https://gist.github.com/7eb028eec863bc1e56e5 - however, I think the timestamp comparison is somehow wrong, it works but I cannot find certain results, does anyone know whats wrong with this short snippet?
[15:48:33] <timkuijsten> is it possible to specify a per user configuration file for the mongo client? i'd like to store the passwords in it instead of specifying it on the command line
[15:50:40] <mw44118> Hi -- I have a question. I'm counting all the documents in a collection, and the query takes a really long time. I'm using mongoengine, which is a python wrapper for mongo, and I'm running this query: ms.MyCollection.objects.count()
[15:51:36] <mw44118> I understand that doing len(ms.MyCollection.objects()) is slow because it would pull ALL the data out of mongo, then make objects for them all, then count the number of elements in that list, but I don't understand why the .count() method is taking so long.
[15:59:53] <mw44118> mongo is awesome!
[16:00:08] <dgottlieb> mw44118: can you confirm that MongoEngine isn't doing that worst case scenario under the hood?
[16:08:13] <solars> can anyone tell me when map/reduce returns a value of null? I don't get that (the value attribute of the document in the returning collection)
[16:10:15] <mw44118> dgottlieb: I can not confirm that. If I wanted to get a count of documents in a collection at a mongo query, how would I do that?
[16:11:30] <carsten> db.collection.find().count()
[16:53:45] <mw44118> OK, it seems like mongoengine DOES do the worst possible thing when I run ms.MyCollection.objects.count(). Dangit.
[17:10:14] <carsten> a powerful database does not help if the user behind the keyboard is a zero
[17:10:38] <carsten> cheers
[17:12:36] <solars> ..
[17:12:59] <solars> how nice
[17:13:19] <kali> is that... macyet ?
[17:15:51] <bikcmp> how well does mongodb scale?
[17:15:58] <bikcmp> I know the uids it uses can repeat.
[17:16:04] <bikcmp> err, not repeat, but they just increment
[17:16:05] <ukd1> it's webscale
[17:16:16] <bikcmp> ukd1: well, the uids it has are similar to 000000000001
[17:16:24] <bikcmp> eventually that'll get too high after x transactions
[17:16:25] <bikcmp> no?
[17:16:49] <kali> oO
[17:17:36] <ukd1> http://www.mongodb.org/display/DOCS/Object+IDs - they're pretty unique
[17:17:54] <ukd1> you can set them yourself btw
[17:18:37] <bikcmp> ooh
[17:18:46] <bikcmp> ukd1: one more thing before I 'go mongo'.
[17:19:07] <bikcmp> ukd1: how many servers can mongodb support replication/distribution to?
[17:19:17] <bikcmp> I know I Had problems with something of mongodb wanting either 1 server or 3 servers.
[17:19:44] <ukd1> replication I think the max is now 9…but it's at least 7
[17:19:58] <ukd1> sharding, no idea of the limit - heard of 150 shards
[17:20:13] <bikcmp> hm
[17:20:16] <ukd1> http://www.mongodb.org/display/DOCS/Sharding+Limits
[17:20:18] <kali> 1or 3 is for config servers
[17:20:23] <bikcmp> ah
[17:20:25] <bikcmp> so, like
[17:20:34] <bikcmp> in a sense it isn't independant?
[17:20:50] <ukd1> the goal is ~1k shards according to docs
[17:45:51] <elarson> does the $set update modifier only allow updating one field at a time? ie does {$set: {foo: "Foo", bar: "Bar"}} set the foo and bar attributes on the document?
[17:47:13] <elarson> sorry if I missed it in the docs. I didn't see it specified and I have an issue in a test where it looks like it doesn't update each field, just the last one (bar in the example above)
[17:48:21] <rhqq> hey. what should i do after i change nssize ?
[17:48:28] <rhqq> to apply it to existing databases
[17:48:42] <rhqq> db.repairDatabase() didnt help
[17:53:08] <mw44118> does anyone offer hosted mongo?
[17:54:54] <linsys1> yea there are a few mongodb services out there
[17:58:53] <rhqq> hey, when i have dots in collection name, does mongo assumes each part as different namespace? like database_name.some.collection.name.4 will be 5 namespaces?
[18:08:07] <multi_io> can I query by value-of-array-element, e.g. db.mycoll.find({"arr[0].textattr": "foobar" }) ?
[18:10:06] <multi_io> (i.e. querying for documents with an attribute arr which is an array whose 0th element is a document with a string attribute named textattr and value "foobar")
[18:19:28] <dgottlieb> multi_io: {'arr.0.textattr': 'foobar'} I think does what you want
[18:41:46] <multi_io> dgottlieb: well, it doesn't for me. But I got a very outdate mongodb here. :\
[18:42:03] <multi_io> I'll try it later on a newer version.
[18:45:58] <jbohn|lunch> back
[19:31:13] <avdeveloper> Hi #MongoDB, first time here
[19:34:36] <ranman> avdeveloper welcome
[19:35:02] <avdeveloper> hello, ranman
[19:46:22] <avdeveloper> it's a busy chatroom over here, huh?
[19:56:59] <ranman> avdeveloper: sometimes.
[19:57:50] <avdeveloper> soo how are you liking Mongo ranman?
[19:58:04] <ranman> I work @ 10gen :P, so I like it.
[19:58:26] <avdeveloper> ooh hahaha
[19:58:38] <avdeveloper> would it be cool if ask u a question?
[19:58:41] <ranman> sure
[19:58:44] <avdeveloper> alright
[19:58:46] <ranman> and how are you liking mongodb?
[19:59:10] <avdeveloper> I'm still trying to get my head around Non-Relational mindset
[19:59:37] <avdeveloper> I'm pondering on denormalizing my data, but that would result in having redundant data across the collections
[19:59:38] <ranman> this is one of my favorite resources: http://mongly.com/
[19:59:46] <avdeveloper> Oooh
[20:00:07] <ranman> this specifically: http://openmymind.net/mongodb.pdf
[20:00:21] <avdeveloper> thanks! I think I'll take a look at multiple collections vs embedded documents
[20:00:32] <avdeveloper> okay checking it out now
[20:06:10] <avdeveloper> okay so I just finished reading embedding vs references. I understand how they work. Now I just wonder if it's a good practice to embed a select few attributes of the Player document such as name and id into a Game document so that fetching a Game data would be faster than having two separate calls?
[20:20:33] <bluesnow> Hi, I'm wondering how I would automatically start a MongoDB instance on a server when a Python web application starts.
[20:25:33] <sirpengi> bluesnow: is there a reason mongodb can't be on all the time?
[20:25:44] <sirpengi> I mean, is your web app not on all the time either?
[20:27:30] <bluesnow> Yeah, it won't be on all the time.
[20:28:25] <bluesnow> Maybe I could use some config initialization file with the web app?
[20:28:28] <bluesnow> I'm not too sure..
[20:30:11] <sirpengi> how do you start your web app?
[20:30:39] <sirpengi> also, mind describing why the web app isn't on all the time?
[20:30:48] <bluesnow> It's going to be on a remote server, and the user just accesses it through a browser.
[20:31:03] <bluesnow> It's for internal use at a company, and I don't think the remote server will be on 24/7
[20:31:45] <bluesnow> Also, even if the remote server is on 24/7, the web app will only be used once a week maybe.
[20:32:00] <bluesnow> So it seems wasteful to keep mongodb running all the time.
[20:32:33] <sirpengi> well, if the server is powered on anyway it doesn't make much different for the services to be on (but idle)
[20:33:34] <sirpengi> but otherwise, how does the user turn on the web app?
[20:33:52] <ranman> avdeveloper: yeah that's a pretty good use case, you don't have to put the whole player document in there
[20:34:10] <bluesnow> sirpengi: They would just access it through a browser URL.
[20:34:15] <ranman> bluesnow: I'd use something like fabric
[20:35:15] <sirpengi> bluesnow: then the web app would be on all the time
[20:36:19] <bluesnow> sirpengi: oh hmm, okay. I'll just see if I can keep the db instance running then
[20:51:32] <David[1]> Is just calling close() on the Connection instance the right way to close a database connection?
[20:52:09] <David[1]> Is there any need to worry about database or collection instances?
[21:23:18] <lolfrenz> hey
[21:23:26] <lolfrenz> is it possible to apply mapreduce only on documents matching certain criteria?
[21:23:39] <lolfrenz> e.g. find first, then mapreduce
[21:24:19] <lolfrenz> I see db.runCommand allows it, but I can't find this option on pymongo
[21:24:46] <lolfrenz> oh, nevermind
[21:24:47] <lolfrenz> found it
[21:44:49] <tystr> I'm sure this has been asked before, but in a collection of docuoments, what's the best way to ensure that embedded documents in the collection all have unique ids?
[21:52:46] <hell_razer> hello all, is any gui viewer for mongodb?
[22:09:51] <foobar2k> hey guys
[22:10:00] <foobar2k> we have a replicaset with 2 machines
[22:10:17] <foobar2k> but almost all of the read operations get sent to the secondary node for some reason
[22:10:39] <foobar2k> is there some way to get read operations to balance better between our primary and secondary
[22:56:33] <m4nti5> Hi guys
[22:59:36] <m4nti5> Supose I have a model like this: http://pastebin.com/RpavFqsY
[23:00:35] <m4nti5> imagine that I have k2 or and want to find k2 and k3, what query would you suggest me to do?
[23:00:57] <m4nti5> I've been trying exists and $ but nothing has helped me so far
[23:16:15] <AdamAdsupply> 8ball
[23:16:22] <AdamAdsupply> ['8']