PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Friday the 13th of June, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[01:09:57] <jimpop> does cloneCollection also clone indexes of said collection?
[01:11:46] <jimpop> more specifically, does it clone indexes in 2.6.1?
[02:01:45] <tonyacunar> Can someone point me to documentation which explains how to do a full text search for a field in a collection which is a DBRef?
[02:22:17] <cheeser> 4
[02:31:49] <joannac> tonyacunar: ...huh?
[02:32:53] <tonyacunar> for example, assume I have an document that has a DBRef, is it possible to create a textIndex on that?
[02:33:28] <joannac> on the field with the DBref?
[02:33:28] <tonyacunar> or can I only index attributes that are directly available in a document
[02:33:48] <joannac> oh I see
[02:33:54] <tonyacunar> yes, on the field with the DBRef, so say the object with the dbRef is called User and user has attribute name
[02:34:07] <tonyacunar> it would have been nice to add user.name to the textindex
[02:34:14] <tonyacunar> I think that feature does not exist
[02:35:00] <joannac> okay, so you ahve an object that refers to a document in another collection
[02:35:19] <joannac> and the document in the other collection has a field "name"
[02:35:37] <joannac> and you want to index in the original collection on the field name in the other collection?
[02:35:45] <joannac> is that right?
[02:35:46] <tonyacunar> Correct
[02:35:50] <joannac> yeah, no
[02:36:02] <cheeser> that'd be a join
[02:36:51] <tonyacunar> Thanks for confirming. So what i’m doing is I’m creating a wrapper around the original collection which contains the fields I want to index on. So I am “joining” for lack of a better word at the application layer
[02:37:01] <joannac> yep
[02:37:01] <tonyacunar> and storing this “indexable” wrapper document
[02:37:25] <tonyacunar> I wanted everything to magically work. Sad it doesnt but the work around is not that bad.
[02:37:27] <joannac> if you're going to store the wrapper document, why have 2 collections in the first place?
[02:38:24] <duozhang> Hi, I met a exception when I tried to insert docs, it confused me: <type 'str'>: (<type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u'insertDocument :: caused by :: 11000 E11000 duplicate key error index: myproj.mycol.$_id_ dup key: { : { binary: "S\x99\udf03\udf67\x12=\x14\x9f\u0380", generation_time: 1402599184 } }', 119, 122, 'ordinal not in range(128)'))
[02:38:46] <duozhang> Is this dup key error ? or an unicode decoding error?
[02:38:47] <joannac> duplicate key error
[02:39:26] <tonyacunar> Well, take this case. Assume I have a user collection and a orderHistory collection. If the user changes an attribute in their user document I don’t want to have to go back and update his 10,000 old orders. I need orderHistory to always have current info of the user but the indexable searchable version can be stale
[02:39:37] <tonyacunar> which I can then re-index with the new info out of band
[02:39:57] <tonyacunar> or maybe I still have SQL in my brain and I am doing things wrong
[02:49:19] <duozhang> Hi Joannac, if the key was auto-generated by pymongo, how could it be duplicated? and I've droped that collection and re-insert again, it still raised this exception~
[04:00:02] <troy__> I'm trying to insert a google map encoded polygon to mongo and the "\" characters are being removed automatically. Do I have to escape them? I thought all UTF8 was safe?
[04:00:09] <troy__> here is what I am trying to insert:
[04:00:21] <troy__> "zone_poly_encoded" : "q{hxGdpmjK{zAre@sAaKeOyM}DuEqBcHeL{w@c@yCdd@eMrDjSzRgFlK{Db\hFhEwAtGwBfNzfA"
[04:00:40] <troy__> the "\" after "Db" gets removed...
[04:02:16] <troy__> I've tried adding another "\" to escape it but the result is two "\" get entered into the collection.
[04:04:06] <troy__> is this a known issue or am I missing something? It's really late here so thats totally possible..
[07:01:49] <gancl> Hi! How to populate other collection's subdocument in mongoose? http://stackoverflow.com/questions/24199444/how-to-populate-other-collections-subdocument-in-mongoose
[07:24:32] <Viesti> hmm, I'm seem to be running into AWS IO limits
[07:26:05] <Viesti> while importing data to a 3 node replicate set, 700 file, 20 000 documents each, so currently 14 million documents, but growing
[07:26:51] <Viesti> doing upserts, should probably look how much of the run actually is updates vs new data...
[07:27:18] <Viesti> current import run with mongoimport 2.4 takes 13h hours
[07:29:48] <Viesti> using MongoDB 2.4.7 with 500GB 1000 IOPS volumes, EBS-optimized
[07:30:40] <Viesti> I tried out 2.6 on a development cluster, and replaced mongoimport with a Python script using the new Bulk write API with pymongo
[07:31:38] <Viesti> locally on my mac (with SSD) the Bulk write api really is fast, but seems that I run into IO speed on the dev cluster, which prevents me from moving into production :/
[07:32:03] <Viesti> any good hints on performance optimizations would be welcome :)
[07:46:07] <joannac> buy more IOPS?
[07:46:30] <joannac> I'm not sure what you're asking. You've identified your bottleneck is IO...
[08:37:39] <frankblizzard> hello - i have a problem: due to a bug in my application (tip game for world cup) it was possible that User's could create a tip twice or more times (using the browsers back button). I have a Tip model and a User model. A Tip references a Match. The tips get embedded into the User model (Array). Now I need to find all Users that have tipped the same match multiple times (so in the user's tip Array there is more tha
[08:37:39] <frankblizzard> n one object with the same matchId). I can't figure out how to do that query in Mongo. Any help would be highly appreciated.
[08:42:59] <gancl> Hi! How to populate other collection's subdocument in mongoose? http://stackoverflow.com/questions/24199444/how-to-populate-other-collections-subdocument-in-mongoose
[08:45:58] <rspijker> frankblizzard: aggregate… Do an unwind, a group and then a match
[08:46:58] <rspijker> frankblizzard: unwind the array, then group on UserId, matchId and add a new filed, say s, which is $sum:1. Then match on s:{ $gt: 1}
[08:47:24] <rspijker> frankblizzard: if you need more specifics, pastebin an example user document
[08:52:45] <frankblizzard> rspijker: thanks, will dig into it now and get back to you in case
[08:59:35] <frankblizzard> rspijker: here is an example user doc. it has only one tip in array but you get the idea. http://pastebin.com/FE0EpJkn
[09:02:10] <rspijker> frankblizzard: db.Users.aggregate({$unwind:”$tips”},{$group:{“_id”:{“u”:“$_id”,”m”:”$match”}, “s”:{$sum:1}}},{$match:{“s”:{$gt:1}}})
[09:02:14] <rspijker> something like that should do
[09:03:02] <rspijker> it can have the same userId twice, so you might want to do some further processing, second $group or something
[09:03:06] <rspijker> but it should be a solid start
[09:04:32] <frankblizzard> thanks... give me a sec i'll try that
[09:04:45] <frankblizzard> trying to get my head around that ;)
[09:05:03] <frankblizzard> that does not modify the data yet, right?
[09:05:28] <rspijker> no, aggregate doesn’t do any edits
[09:05:35] <frankblizzard> good
[09:05:59] <rspijker> it will give you a list of every user,match combination that occurs more than once
[09:06:31] <rspijker> so, if user x has tipped matches 1,1,2,3,4,4,5. It will give you results x,1 and x,4
[09:06:36] <rspijker> at least, I think it should :P
[09:06:46] <rspijker> it’s not tested, so not sure if braces etc are balanced
[09:06:57] <rspijker> unfortunately IRC does not have JSON highlighting :(
[09:08:04] <Derick> rspijker: pff
[09:08:05] <Derick> :-)
[09:10:44] <rspijker> one of the greatest shortcomings Derick ....
[09:11:49] <frankblizzard> well, here is the summary of my problem
[09:11:50] <frankblizzard> http://hastebin.com/yiyirohiho.coffee
[09:12:03] <frankblizzard> the aggregation worked but its not yet helpful
[09:13:02] <frankblizzard> I think sum is just the sum of the tips?
[09:13:05] <Derick> { $group: { "_id" : { "user" : "$_id", "m": "$match", "g": "$group" }, "sum": { $sum:1 } } },
[09:13:08] <Derick> should be
[09:13:15] <Derick> { $group: { "_id" : { "user" : "$_id", "m": "$tips.match", "g": "$tips.group" }, "sum": { $sum:1 } } },
[09:13:22] <Derick> unwind doesn't remove the key name
[09:13:28] <rspijker> doesn’t it? :/
[09:13:35] <Derick> no
[09:13:45] <Derick> what if you already had a "match" key one level up?
[09:13:46] <rspijker> you are correct :)
[09:13:53] <Derick> { $group: { "_id" : { "user" : "$tips._id", "m": "$tips.match", "g": "$tips.group" }, "sum": { $sum:1 } } },
[09:13:56] <Derick> even
[09:13:59] <Derick> missed the user there
[09:13:59] <rspijker> it just separates it, of course
[09:15:37] <frankblizzard> very cool, you guys nailed it. thanks a lot!
[09:48:33] <djlee> Hi all, not sure if this is a PHP driver feature, but it looks like i can specify multiple mongo hosts in the connection, and it will attempt to connect to each one in turn, and return a connection to the first one tha succeeds. Is that right, or is the multiple hosts purely for replica sets?
[10:14:17] <rspijker> djlee: fairly sure that’s for replica sets....
[10:14:28] <rspijker> at least, that’s how a regular mongo connect string works
[10:15:19] <voxadam> Has anyone managed to get mongo installed on Debian sid lately?
[10:15:23] <djlee> rspijker: yeah i think i understand now. Unfortunately i've moved on to another problem, if i specify un/pwd in the host string, it works, but if i specify it as a config attribute, it doesn't. annoying as hell
[10:16:07] <rspijker> djlee: because that’s not configuration? :/
[10:16:51] <djlee> rspijker: in php mongoclient you can specify the un/pwd as a config attribute rather than in the string (assuming it then merges it into the string).
[10:23:10] <rspijker> hmm, ok. Don’t really know anything about the PHP driver
[11:35:25] <crib_> hi guys, is there any way to terminate an aggregation inside the $group operator
[11:36:04] <crib_> the case is, i have an aggregation that i would like to stop when it counts up to 1000
[11:53:39] <rspijker> crib_: fairly sure that’s not possible
[12:06:32] <crib_> rspijker: what about mapreduces, can i somehow terminate the reduce when I reach my goal?
[12:06:42] <crib_> cant' seem to find any info on that
[12:37:08] <goncalop> hi there - I'm running a CentOS instance which has NUMA , noticed the default configuration uses fork=true - if I can the service with the NUMA interleave=all it will not be applied to the forked process ?
[12:57:41] <thomastuts> hi guys
[12:57:44] <thomastuts> does anyone know of a good way to migrate a mysql database to mongodb including relations etc?
[12:57:55] <thomastuts> i tried mongify, a ruby solution, but found that it was inadequate - it did not correctly save references for relationships
[13:02:11] <MrMambo007> hi all
[13:05:10] <MrMambo007> I want to to persist just one array of similar js objects. The array may reach a length of 10 K to 100 K. I don´t need to read or write to it often, but when I do write to it, the items will be in a different order. Any best practice examples?
[13:08:21] <rspijker> MrMambo007: not really sure what you are asking…
[13:08:45] <MrMambo007> rspijker ... well I´m thining of implementing a leaderboard
[13:08:59] <rspijker> ok...
[13:09:11] <MrMambo007> basically a long array of usernames, scores, timestamps
[13:09:59] <MrMambo007> the array is intended to be sorted any given time so the highscore entry is at index=0
[13:10:27] <rspijker> why is this an array and not just a collection of documents?
[13:10:58] <rspijker> so, just make a collection Leaderboard, with documents that contain username, score, timestamp
[13:11:04] <MrMambo007> well I don´t know if it has to be an array, but I´d prefer the collection was sorted
[13:11:08] <rspijker> add an index on score
[13:11:17] <rspijker> and there you have your sorting
[13:12:04] <MrMambo007> ok sounds like you have the right approach. How do I add index on the score parameter?
[13:12:04] <rspijker> you still need to include a .sort in your queries, but it will be really fast, because it’s indexed
[13:12:18] <rspijker> db.Leaderboard.ensureIndex({“score”:1})
[13:14:20] <MrMambo007> ok :) thanks
[13:15:35] <MrMambo007> can I den query based on index? something like: db.Leaderboard.find( { score: 0 } ) ??
[13:15:44] <MrMambo007> den->then
[13:15:58] <rspijker> you can, that will find any document with score 0
[13:16:30] <MrMambo007> ok.. lol.. I´m a noob on mongodb...
[13:16:45] <rspijker> if you want to find the highest score, you need to do db.Leaderboard.find().sort({“score”:-1}).limit(1)
[13:16:47] <MrMambo007> Say I want the item at index n?
[13:17:19] <rspijker> that finds all documents, sorts the by score descending (what the -1 means) and then limits it to 1 document, so only finds the one with the highest score
[13:17:30] <rspijker> internally, mongo will use the index, so it will be really fast
[13:18:07] <MrMambo007> Exellent answer : sorted collection of the top-ten on the highscore will be: db.Leaderboard.find().sort({“score”:-1}).limit(10)
[13:18:09] <MrMambo007> ?
[13:18:51] <MrMambo007> Entire higscore list sorted will be jus: db.Leaderboard.find().sort({“score”:-1}) ??
[13:19:21] <rspijker> correct on both counts
[13:19:46] <MrMambo007> That was exellent help rspijker!
[13:20:36] <rspijker> if you want 10 to 20, you can do db.Leaderboards.find().sort({“score”:-1}).skip(10).limit(10)
[13:21:03] <MrMambo007> cool - paginated results!
[13:21:07] <rspijker> exactly
[13:21:55] <MrMambo007> :)
[13:21:57] <rspijker> 11 to 20 that is btw, not 10 to 20
[13:22:54] <MrMambo007> is this your page : http://rspijker.nl/
[13:23:47] <rspijker> no, though I am Dutch
[13:25:11] <MrMambo007> I´m Norwegian
[13:25:25] <Derick> Så jeg snakke begge Norsk, maar ook Nederlands :-)
[13:27:06] <MrMambo007> Hehe:) I have this very absud query for you... we had this comedy show with a weeklu monty-python like performance using a an old dutch song
[13:27:22] <MrMambo007> https://www.youtube.com/watch?v=-mwxE7Ky5hs
[13:27:26] <MrMambo007> what is this song about?
[13:28:15] <Derick> he's saying that because he is living in the netherlands, he should sing in dutch; just like in a restaurant the menu should always be in french.
[13:29:03] <Derick> something about a girl on a bike having to cross a river on a ferry
[13:29:18] <rspijker> skipper can I cross here, yes or no, do I have to pay, yes or no
[13:29:19] <MrMambo007> here is another version
[13:29:21] <Derick> yeah
[13:29:22] <MrMambo007> https://www.youtube.com/watch?v=lwZNuwAK-dc&list=RD-mwxE7Ky5hs&index=2
[13:29:27] <Derick> that's a traditional children's song
[13:29:32] <rspijker> it is indeed
[13:29:47] <MrMambo007> haha..
[13:30:14] <Derick> my favourite is still https://www.youtube.com/watch?v=s-mOy8VUEBk&list=RD-mwxE7Ky5hs&index=5
[13:30:16] <kali> i think we have reached a new low point in signal to nois ratio :)
[13:30:26] <Derick> yeah, sorry, friday afternoon :-)
[13:30:39] <MrMambo007> Yeah that Danish language sketch is legendary
[13:31:16] <Derick> i lived in norway for 5 years
[13:31:36] <MrMambo007> Research actually shows that Danish children learn their mother tounge a bit later than other kids because of the lack of consonants.
[13:32:09] <MrMambo007> Words in Danish are much less distinct from eachother than in most languages
[13:32:39] <Derick> MrMambo007: this is why: http://www.youtube.com/watch?v=FqgRC5sfCaQ
[13:32:42] <Derick> (ok, last one)
[13:33:37] <MrMambo007> Have to have a look :)
[13:36:20] <MrMambo007> hehe good one
[13:45:59] <karan> Hi guys, some times I can see mongodb consumes high memory like 4GB, after restart mongodb service it comes to normal. I hope that because of indexing. How can I handle this?
[13:46:31] <Nodex> tht's due to your working set and caching
[13:46:51] <Nodex> Mongodb will use as much memory as it can to cache objects and indexes in memory
[13:47:44] <rspijker> karan: also, you might be looking at the figure for virtual memory. Which is not necesarilly the actual (resident) memory consumption
[13:48:13] <kali> yeah, virtual memory, is really virtual, it's just address space
[13:49:03] <kali> if it is the resident (RSZ) that shows this behaviour, you may have an issue. connection leak is a good candidate
[13:52:55] <karan> thanks, is that possible to set predefined size for cache and index ?
[13:53:35] <MrMambo007> so rspijker: if I do a db.Leaderboard.insert( newScoreSubmit, { ordered : true} ); (assuming it is helpful to tell mongodb to keep the list sorted) - is there a way to obtain the index of the inserted object?
[13:55:29] <kali> MrMambo007: man, you're confused
[13:55:30] <MrMambo007> ... so given a field that has been indexed in a collection of object (like the score field) how do I get the index of of a particular object
[13:55:52] <MrMambo007> I´m telling you.. I´m a mongo db noob
[13:56:22] <rspijker> MrMambo007: the index is automatically maintained.
[13:56:31] <rspijker> so you don;t have to explicitly tell it on insert
[13:56:55] <MrMambo007> thanks rspijker
[13:57:00] <Derick> karan: no, mongodb uses as much memory as it can
[13:57:08] <kali> MrMambo007: ordered insert only means that mongodb will stop on an error
[13:58:02] <rspijker> there is no easy way to know the index inside of the index (ugh, one word, two meanings) upon insertion, or at all, for that matter
[13:58:34] <rspijker> what you can do is do a query where you count all documents with a larger value, relative to your indexed field
[13:59:18] <rspijker> consider the collection an unsorted bin of documents. The index is a list that has all of the documents inside of the bin in a certain order. Depending on the field(s) the index is on
[13:59:38] <rspijker> So you can have multiple indexes on the same collectino, basically meaning you have different sort orders on the same set of documents
[13:59:50] <MrMambo007> ok... so probably have to mainatin an in memory array in the node.js app and try and keep it in sync occationally with the mongodb object collection that handles the persistance of the leaderboard
[14:00:02] <rspijker> not really…
[14:00:18] <rspijker> because your collection is indexed on that field, the count query will be pretty quick...
[14:00:37] <MrMambo007> Ok
[14:00:54] <rspijker> say you insert a new document with score x, then you can just go db.Leaderboard.count({“score”:{$gt:x}})
[14:01:18] <MrMambo007> ahhh
[14:01:25] <rspijker> that will tell you how many there are in the list with a higher score
[14:01:37] <rspijker> and that’s going to be a quick query, again, due to your index
[14:01:39] <MrMambo007> great :)
[14:01:56] <MrMambo007> Thanks a lot for that info rspijker
[14:02:17] <rspijker> np
[14:02:32] <MrMambo007> Your my favourite dutchman
[14:02:39] <remonvv> \o
[14:03:12] <remonvv> <- better dutchman
[14:03:34] <MrMambo007> remonvv: No way!
[14:03:40] <Derick> ← even better Dutchman
[14:04:10] <MrMambo007> Derick: No f***ing way! lol
[14:04:14] <remonvv> Derick: Nobody believes you're dutch. You lack a certain orangeness
[14:04:20] <Nodex> haha
[14:04:21] <MrMambo007> Are there only Dutch node.js ninjas?
[14:04:24] <Derick> I'm wearing orange right now.
[14:04:32] <remonvv> Pics
[14:04:37] <Nodex> or didn't happen
[14:04:38] <Derick> MrMambo007: the MongoDB node driver author is Norwegian
[14:04:41] <Derick> yeah... no
[14:04:55] <remonvv> No proper dutchman fiddles with node.js
[14:05:00] <Derick> right so!
[14:05:10] <kali> mmm... spain. tough one :)
[14:05:31] <Derick> kali: there is some unfinished business :-)
[14:06:43] <remonvv> Indeed. One of our defenders didn't properly broke Iniesta in two with a kick to the chest. He's going to try and finish the job tonight.
[14:06:51] <kali> honduras should be easier
[14:07:00] <remonvv> break*
[14:07:32] <Derick> remonvv: :-)
[14:07:54] <MrMambo007> Ahh.. one more thing... i want equal scores to be sorted based on time.. I have a timestamp in the object. so basically I should index that field as well?
[14:08:17] <kali> MrMambo007: yeah. in the same index, and AFTER the score
[14:08:23] <Derick> you need to make a compound index for that
[14:08:51] <MrMambo007> Will that kill performance?
[14:08:55] <Derick> db.colbane.ensureIndex( { score: 1, timestamp: 1 } );
[14:08:57] <Derick> MrMambo007: no
[14:09:09] <MrMambo007> :) great :)
[14:09:28] <rspijker> remonvv: it was not a defender, unfortunately this disqualifies you from the better Dutchman competition. Thank you for playing and better luck next year
[14:09:29] <MrMambo007> Derick: You are rising on my favourite dutchman index
[14:10:07] <rspijker> Derick: by pure coincidence, my client colours you orange…
[14:10:33] <Derick> one more point for me then ;-)
[14:11:06] <rspijker> also, it wasn;t iniesta.. it was Xabi Alonso iirc
[14:11:54] <remonvv> Fine fine, I was crying shortly after that moment so maybe my memory is blurry. And defensive midfielder is pretty much a defender ;)
[14:13:05] <MrMambo007> You dutchmen have saved me a lot of time in researching and implementing a mongodb driven leaderboard! Lots of good karma emmenating form Holland today.
[14:13:52] <rspijker> MrMambo007: check out meteor, I believe it has an example of a mongo backed leaderboard on their website. Also, meteor is pretty awesome :)
[14:14:08] <remonvv> MrMambo007: How many score records do you think you'll have? Leaderboards are spectacularly hard to do at scale.
[14:14:16] <rspijker> remonvv: you are forgiven :)
[14:14:16] <Viesti> I have a dutch dataset that gives me a headache when importing it to our mongo cluster :)
[14:14:33] <MrMambo007> 10K-100K I guess
[14:14:50] <remonvv> MrMambo007: That shouldn't be much of a problem.
[14:15:45] <MrMambo007> I´m hoping it will fit nicely on a free heroku instance
[14:16:11] <remonvv> Do you expose just the top X or can people see specific leaderboard pages?
[14:16:22] <MrMambo007> (sandbox size 496 mb)
[14:17:11] <MrMambo007> well with the pagination suggestion from rspijker I could do pagination as well.. but the spec only requires me to show top 10 + the users rank in
[14:17:41] <MrMambo007> db.Leaderboards.find().sort({“score”:-1}).skip(10).limit(10)
[14:18:24] <Derick> if you're sorting on score descendingly, then I told you the index the wrong way around
[14:18:30] <Derick> db.colbane.ensureIndex( { score: -1, timestamp: 1 } );
[14:18:33] <Derick> makes more sense then
[14:18:44] <Derick> or is the timestamp sort also descendingly?
[14:18:49] <remonvv> skip is O(n), it's not very good for leaderboard pagination.
[14:18:59] <Derick> remonvv: there are tricks though
[14:19:28] <remonvv> Certainly are, but they're relatively complicated.
[14:19:49] <Derick> remonvv: nah, you just need to change your find, to be >= your last entry
[14:20:41] <remonvv> Derick, your last entry in that page which you only know if youre paging sequentially
[14:20:49] <Derick> true
[14:21:11] <MrMambo007> so for obtainint a compound indexed sort should I ask for a compound sort in my find query?
[14:21:17] <remonvv> If that's the only way to get the specific pages in your UI it's fine of course. Things like showing the page the player is on is more tricky though.
[14:21:31] <MrMambo007> earliest timestamp should rank higher
[14:21:34] <Derick> MrMambo007: no, indexes are handled for you. You don't need to do anything about it yourself.
[14:21:42] <Derick> db.colbane.ensureIndex( { score: -1, timestamp: 1 } ); then
[14:22:06] <remonvv> Derick, isn't that the same as {score: 1, timestamp: -1}?
[14:22:16] <remonvv> order is only relative to the previous index term no>
[14:22:18] <remonvv> ?
[14:22:20] <Derick> correct
[14:22:26] <Derick> well, not really
[14:22:45] <Derick> the index is in the order you specify, but mongodb can loop the *whole* index in reverse
[14:23:13] <remonvv> Right but it's a b-tree so it changes the index data but has no effect in performance iirc.
[14:23:21] <Derick> correct
[14:23:23] <remonvv> -1 is more intuitive in this case anyway though
[14:24:09] <MrMambo007> ok so mongo keeps a b-tree datastructure for the items... and anytime i run dhte ensureIndex() function It will resort the b-tree?
[14:24:20] <Derick> no, it sorts automatically
[14:24:26] <Derick> ensureIndex just creates an index
[14:25:23] <MrMambo007> so you can have many indexes on the same collection or will it replace the previous index?
[14:25:29] <remonvv> You can have many
[14:25:59] <remonvv> But adding indexes increases data size/memory usage and degrades write performance
[14:26:05] <Derick> 63 user defined ones to be precise
[14:27:07] <MrMambo007> find().sort({“score”:-1, "timestamp":1}) to get my correctly sorted result?
[14:27:30] <Derick> yes
[14:27:37] <Derick> (without the curly quotes)
[14:27:52] <MrMambo007> :)
[14:29:18] <MrMambo007> but the count function will be more complex
[14:30:39] <remonvv> On a slightly different note; we're seeing issues where a removeShard returns done while there are still chunks in the db.chunks collection. It's a bit of a edge case but perhaps someone knows what's what. It's on 2.6 / replicated shard.
[14:32:21] <MrMambo007> db.Leaderboard.count({“score”:{$gte:currentscore}}) whee also the timestamp is less than the current timestamp.
[14:35:39] <rspijker> MrMambo007: simply db.Leaderboard.count({“score”:{$gte:currentscore}, “timestamp”:{$lt:currentTimestamp}})
[14:36:30] <MrMambo007> I wast thinking what you wrote rspijker..this is starting to make sense :) Thanks!
[14:37:41] <MrMambo007> rspijker: you are maintaining your number one position as my favourite dutchman
[14:40:20] <jekle> +
[14:40:30] <jekle> sorry!
[14:41:08] <MrMambo007> Derick: You are pretty close as well. And your nick makes me happily think about this childhood hero: http://oldschoolgameblog.files.wordpress.com/2013/06/derrick-4f4e603ddfa5d.png
[14:41:47] <Derick> that's misspeled
[14:41:51] <Derick> It's with on R
[14:41:52] <Derick> one*
[14:42:24] <MrMambo007> lol
[14:46:54] <halfamind> Hey folks. I've been using the chef cookbooks to set up mongodb servers and started seeing that mongoimport/export were missing. Is that a change w/2.6.1?
[14:49:25] <BurtyB> halfamind, depending on your distro it looks to be in a different package now (mongodb-org-tools on centos)
[14:51:21] <MrMambo007> So long folks! And a special thanks to the good people of Holland!
[15:00:30] <jiffe98> don't suppose I can profile queries when using mongos eh?
[15:03:14] <halfamind> BurtyB: Thanks. Any idea how to install that via recipes? From what I can tell, it's attempting to install the mongodb-org "meta" package that includes tools.
[15:03:48] <jiffe98> nm first time I enabled it on one of the replicas I only got 7 queries but its running now
[15:09:05] <BurtyB> halfamind, not me as I have nfi what recipes is
[15:49:28] <BlakeRG> so i need a text index on a field if i want to be able to search it with something analogous to LIKE %foo% am i correct?
[15:55:21] <cheeser> you could use a regex query but that wouldn't use an index.
[16:30:04] <mylord> anyone? https://gist.github.com/anonymous/a5c9acdd7d88c46fbea2
[16:44:34] <cheeser> mylord: try asking a question...
[17:12:03] <mylord> cheeser, its in the link
[17:12:14] <mylord> how to update score of users "53949a18dee87d16a92d6d47" in this array? https://gist.github.com/anonymous/a5c9acdd7d88c46fbea2
[17:36:48] <cheeser> oh. at the very top.
[17:37:27] <cheeser> can you not just $set "users.53949a18dee87d16a92d6d47.score" ?
[17:50:49] <voxadam> Has anyone managed to get mongodb installed from the repo on Debian sid any time recently? Every time I attempt to install the package(s) I get an error when dpkg tries to start the daemon. I also get the same error when I try to start the service using the service command. http://pastebin.com/J1jGNE6C
[17:51:45] <Hexxeh> Hey
[17:52:27] <Hexxeh> If I have a ListField and an array, and want to find all documents where all values in the listfield are also found in the array, how do I specify that filter?
[17:52:45] <Hexxeh> I can only find how to do the inverse...
[19:01:44] <co10bok> hi... I'm spammed by MMS notification service. I have been granted to access to one of client's account for consulting purpose. It pass a lot of time up to now. I have no any credentials to access to my account and disable notification.So... Is there any way to switch off that account or disable email notification?
[19:39:11] <Chaz6> Hi there, I'm trying to use pymongo on cygwin; i've tried easy_install, and the source from git, but when i do `import pymongo` the interpreter just quits
[19:39:59] <Chaz6> How can I troubleshoot this?
[19:43:06] <Chaz6> 258 13778904 [main] python2.7 4772 seterrno_from_win_error: /home/corinna/src/cygwin/cygwin-1.7.30/cygwin-1.7.30-1.x86_64/src/src/winsup/cygwin/dlfcn.cc:216 windows error 127
[19:43:20] <Chaz6> I think this may be a cygwin64 issue :/
[20:00:25] <Chaz6> Seems the solution is to install e2fsprogs
[20:07:38] <fschuindt> Guys I am a newbie, what is model structure behind a comment model with responses. Like this: You can comment a post, but you can comment a comment. So a comment embeds itself? :x
[21:53:46] <lxsameer> hey guys, does reference 1-n is good in performance compare to embed 1-n ?
[22:56:38] <hpekdemir> hi all
[22:57:41] <hpekdemir> I will feetch information from several devices. around 40 different network components. let's say switches, information about ports. each switch has 48 ports and some aggregated interfaces. so about 50-55 in total.
[22:58:19] <hpekdemir> each switch will have it's own document. and I will append more and more by the time. information fetching is will be done every minute.
[22:58:50] <hpekdemir> I did some calculation. this would result in one collection or document with several million entries.
[22:58:54] <hpekdemir> does mongodb handle this?
[22:59:27] <hpekdemir> several million entries in 6 months alone.
[22:59:37] <hpekdemir> several weeks I mean.
[22:59:49] <LouisT> i would assume so.. look at all the massive companies that use it
[23:03:45] <hpekdemir> ok just found one company blogging about 2 billions entries *per day*. I'm chilled now. :>
[23:05:22] <panurge> "collection dropped between getMore calls code:17356" - What that mean? Seems like is MongoCursor is getting down over the way
[23:05:46] <panurge> its on a pro deploy, not sure yet of the trace
[23:06:05] <cheeser> looks like someone dropped the collection you're querying agains.
[23:06:32] <panurge> me myself? well just an empty collection??
[23:06:48] <panurge> :)
[23:29:49] <panurge> yeah, missing collection.. strangely havent found any mention to that err
[23:31:00] <Derick> panurge: is that the PHP driver?
[23:31:52] <panurge> yep :p
[23:32:03] <Derick> can I see the code?
[23:32:09] <panurge> sure
[23:32:27] <Derick> we just fixed: https://jira.mongodb.org/browse/PHP-1118
[23:34:59] <panurge> http://pastebin.com/QSPtQM2t
[23:35:15] <panurge> its using an abstraction hope I could make it clear enought
[23:35:24] <Derick> what is self::aggregate ?
[23:35:43] <Derick> and do you get an empty result out of this?
[23:35:50] <Derick> if so, then that is bug PHP-1118.
[23:35:56] <Derick> we'll have a fix out in Tuesday's release
[23:36:04] <panurge> self::getCollection()->aggregateCursor($pipeline, $options);
[23:36:06] <Derick> or you can get the v1.5 branch out of github
[23:36:27] <panurge> and then start an iterator which ->rewind() and is here the crash happens
[23:36:37] <Derick> it's not a crash, it's an exception
[23:36:48] <panurge> k
[23:37:49] <panurge> humm cool Derick!! I've seen you were having a lot of work recently.
[23:38:03] <Derick> there is always a lot of work :-)
[23:38:20] <panurge> So the confirmation is the exception is caused by missing collection?
[23:38:32] <Derick> either that, or an empty result
[23:38:44] <Derick> the the empty result throwing that error is wrong
[23:38:52] <Derick> and we fixed that through https://jira.mongodb.org/browse/PHP-1118
[23:38:58] <Derick> which will be in Tuesday's release
[23:38:59] <panurge> should I be able to update via pecl?
[23:39:07] <Derick> it's not released yet, so no
[23:39:14] <panurge> on tuesday
[23:39:16] <panurge> ok
[23:39:21] <Derick> yes, on tuesday
[23:40:45] <panurge> ok thank you very much for the support. I should evaluate if the branch install is needed
[23:41:51] <panurge> well maybe I have no options :D
[23:42:05] <Derick> you can always catch the exception
[23:56:45] <panurge> installed from git.. worked out - that was a fast bug fix! :D
[23:57:17] <Derick> hehe
[23:57:24] <Derick> I fixed it on Wednesday I think