[03:08:07] <Astraea5> Hi. I'm trying to find N of each type of something in a collection. Like a collection of objects indexed by color, and I want two objects of each color (but I don't know what colors exist beforehand).
[03:08:38] <Astraea5> Can anyone point me in the right direction to make that sort of query?
[09:37:12] <jet> Is there a way to set a long value into a document inside the console?
[11:49:45] <will_p> Hey. I have created a user with the 'readWrite' role inside a database, but when I authenticate with them I can't insert. I get this error (using the mongodb ruby client): 16544: not authorized for insert on my_db.my_collection
[11:49:57] <will_p> Anyone have any idea what the problem could be?
[11:51:43] <will_p> It seems to work fine via the mongo client using the same user :/
[11:53:21] <joannac> You sure you authenticated correctly?
[11:58:47] <will_p> I think so. Printing out client.auths shows the expected authentication
[12:17:56] <will_p> Figured it out. Missed the read_only argument and so the options hash with roles: ['readWrite'] was truthy and therefore made it read only. Good times.
[12:45:51] <andrepadez> Hi everyone! can someone help me with a design problem i'm having? I'm building a blog with mongodb. I am having trouble figuring out what would the best way to find the next and previous post, counting from the one i'm reading now
[13:53:03] <asker> hey guys, i have an array in a doc and i need my findOne to return only certain array elements matching my criteria. i don't get to filter the output
[15:41:19] <Nodex> I don't have a clue, at a guess it would probably hold the socket open for each request until explicitly closed which uses memory etc but that's just speculation
[15:43:25] <asker> well ok, need to checkout the diff. you get 'unlimited' mongodb connection for free hosting and like 50 concurrent mysql connection costs about 100€ on a dedicated mysql server
[15:45:57] <Nodex> why do you need persistent connections in mysql?
[15:51:44] <GHJGH> afternoon all, I'm doing my first mongodb upgrade, 2.4.4 to 2.4.8, any gotchas or tips?
[15:59:32] <asker> Nodex: i have several workers running... they need mysql connections
[16:00:40] <asker> i tried to wait for available connection if there are no slots free. connect -> do stuff -> disconnect but it won't work with ratio like 2:1 (workers:connections)
[16:13:42] <Nodex> asker : what server side language are you running?
[16:16:17] <asker> its *thinking* well, i don't know anything about setting up servers myself. so im hosting it on a cloud provider (fortrabbit). they use scheduler, i guess its using the fpm
[16:17:38] <Nodex> fpm is not threaded it's a spawned process from a parent so I'm not sure how that gets handled in the connection. It's been a few years since I touched mysql in any sort of meaningful way
[16:18:57] <asker> well, im close to completing my mongodb adapter, so... no need to care about mysql anymore :D
[17:13:49] <banditron> i need to change the datatype of a field on many documents in my db. if i'm running a mongo shell on the same machine as the master, it is better/worse to use db.eval() { ... forEach() } ?
[17:24:03] <jyee> not that simple and generally not a good idea to just throw a relational schema into mongo and expect any usefulness from it.
[17:24:20] <justanotherday> Yes, I guess there is a relationshop between somehow as I am supposed to perform a JOIN when I get it all set up ( i think mongodb does not support join) but alas I have to work on this
[17:25:54] <jyee> justanotherday: you should figure out what joins you need before hand, then write a quick script to do those queries, format the data and insert them into mongo.
[17:27:34] <ron> too bad I'm not in geneva now. could have met.
[17:28:06] <cheeser> i know! i'll be in dusseldorf friday. frankfurt. gothenburg. take your pick. :D
[17:28:10] <justanotherday> I kinda know what I am supposed to be, but how I am supposed to do it is the problem. Am not an IT person, reading biology, we usually use sql to store data but am supposed to be investigating mongodb and i have all this info, but totally lost on how to get it done
[17:28:38] <ron> not in europe anymore now that I'm out of a job
[17:33:55] <retran> europe is so rude to kick you out just b/c you dont have a job
[17:56:55] <rafaelhbarros> anyone with ndb experience?
[17:57:18] <rafaelhbarros> I know, "wrong" chat, but as someone with mongodb exp, I need some help migrating the ndb stuff.
[17:58:28] <jkitchen> I'm working on doing some offsite backups for our mongodb cluster and I'm wondering if it's save to put the dump directory inside the mongodb data directory?
[17:58:54] <jkitchen> ubuntu uses /var/lib/mongodb for data directory by default. I want to dump to, say, /var/lib/mongodb/backup-dump
[17:59:23] <jkitchen> reason being that /var/lib/mongodb is a different volume than /, and / is not very big
[17:59:36] <jkitchen> but /var/lib/mongodb is really damn big :)
[18:13:34] <bjori> jkitchen: but for a backup system.. its not very productive to dump onto the same disk..
[18:14:45] <bjori> oh. I see. you already knew that :)
[18:16:49] <jkitchen> bjori: I have to dump it locally before shipping it offsite
[18:17:17] <jkitchen> I'd rather not loop through each db/collection and ship them individually
[18:17:43] <jkitchen> and I can't pipe the wholedamnthing because it doesn't support that right now
[20:15:48] <faranjessani> hey guys, is there a good reference for the different java frameworks out there to communicate with MongoDB w/o tight coupling in the models?
[20:16:26] <cheeser> what do you mean by tight coupling?
[20:16:40] <faranjessani> my objective is to avoid mongodb specific annotations in the models
[20:17:19] <cheeser> oh, well, that's going to be really hard to do.
[20:18:21] <faranjessani> is there no equivilant [Serializable] from c#?
[20:19:06] <cheeser> you could use eclipselink or hibernate obm if you don't mind *those* annotations. or spring-data. i prefer morphia for not so subtle bias reasons.
[20:19:19] <cheeser> well, you could use mongo-jack i think it's called.
[20:19:27] <cheeser> then you'd jsut have jackson annottions.
[20:20:03] <cheeser> (stupid hotel wifi messing with my typing and i just can't be bothered to fight it anymore :) )
[20:20:11] <faranjessani> awesome, let me look that up.
[21:08:59] <bjhaid> I get you, guess the name box confused me
[21:33:47] <natefinch> hopefully quick question - is there a database command that duplicates the functionality of rs.config()? I can't seem to find documentation on it. I'm trying to write some Go code using labix.com/v2/mgo that manipulates replica sets.
[21:39:16] <jkitchen> natefinch: function () { return db.getSisterDB("local").system.replset.findOne(); }
[21:39:33] <jkitchen> natefinch: if you run rs.conf without the parentheses that's what you get
[21:40:22] <natefinch> jkitchen: ahh, yeah, I see now it lists local.system.replset ... which makes sense, since it's just a document in the system
[22:01:10] <jrbasso> has someone had an issue of the moveChunk being aborted in a shard? I have the version 2.4.4 and it is showing in the log multiple times the moveChunk was aborted
[22:17:31] <jrbasso> I got the answer from https://groups.google.com/forum/#!topic/mongodb-user/6usJtSMtUiQ
[23:32:53] <testing22> hello, i've followed the Use Cases > Pre-Aggregated Reports page (http://docs.mongodb.org/ecosystem/use-cases/pre-aggregated-reports/) to develop my reporting system, however i'm running in to issues wrapping my head around timezones using this technique. from what i've gathered researching this, in order to allow reporting in different timezones, i would either have to aggregate in to supported/specific timezones, storing redundant d
[23:32:54] <testing22> for each or aggregate on a granularity no greater than an hour... thoughts ???
[23:34:53] <testing22> the problem is that with my data, if it were to aggregate on an hourly basis, it would be so segmented that the pre aggregation benefit wouldn't exist and i'm back to square one
[23:39:40] <aodhol> i'm trying to insert new documents into my database. The schema has several nodes, one of which is an array. When I insert I wish to have items which have the same compound key updated such that the array node will have an element added to it