[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: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] <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: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: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: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: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 ?
[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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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.
[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: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: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: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.