[05:39:21] <tomlikestorock> given a document schema of trait_text, person_name, trait_usage_count, I'd like to get each distinct trait_text with the person_name who has the max(trait_usage_count). I'm trying to do this using $first with aggregation, and am failing. What should I be doing?
[08:24:44] <_{Dark}_> someone have experience to restore a mongo database from a single server (one mongodb instance, no replica, no shard) into a replicaset?
[08:26:04] <Baribal> _{Dark}_, not really, but that shouldn't be an iddue besides taking quite a bit of time if the DB is big.
[08:31:35] <_{Dark}_> that are configured in this way: http://www.catify.com/2010/11/22/mongodb-infrastructure-tests-part-ii-produktion-ready-sharding/
[08:32:29] <Nodex> you said "No shard", that speaks of shards
[08:34:30] <Nodex> do you just want a copy of your data on each server?
[08:35:27] <_{Dark}_> I would like to copy the data that I have in the old single machine to the new infrastructure (designed like the link that i post)
[08:35:42] <_{Dark}_> and of course be sure that this data are correctly replicated
[08:36:08] <_{Dark}_> after this probably I will decide a shard key and shards also the current data
[08:36:33] <Nodex> mongodump to each machine and restore it
[09:45:50] <kali> FluxiFlax2023: show me your pipeline, and a typical doc them :)
[09:47:11] <FluxiFlax2023> kali, I am really new to mongodb and this is the first time I do use it ... I am using it with an open source product, I know the very basics of mongodb...but basicallly the product creates the db and hanles all access to it
[09:55:54] <kali> FluxiFlax2023: well, it looks like this "open source product" is somehow overusing or badly using mongodb's aggregation framework. you probably need to get in touch with the author
[09:56:45] <FluxiFlax2023> kali, did do so..nothing fruitful so far...thanks anyway
[09:56:56] <FluxiFlax2023> kali, no way to disable the 10% limitation ?
[10:00:49] <kali> FluxiFlax2023: not that i know of
[10:53:51] <vargadanis> hello everyone! I am fairly new to mongodb and I was curious if there is some docs on how to set up a typical mongodb env.
[10:54:06] <vargadanis> relatively small load system is what I am talking about
[11:29:06] <trupheenix> Nodex, what am I hearing this stuff about hyperdex being better than mongodb? their support is a joke. they barely have any drivers to boot.
[11:44:24] <Nodex> databases who ride from slating and trying to undermind successful ones will never ever ever triumph
[11:45:06] <Nodex> all they do is put MongoDB down in terms of performance and ACID .... if thier product is so great why has nobody heard of it :)
[11:45:34] <Nodex> A truly good product will shine thru no matter what
[13:24:33] <vargadanis> with mongodb can I create document references across databases?
[13:25:57] <leifw> vargadanis: http://docs.mongodb.org/manual/reference/database-references/#dbref yep, set the $db field
[13:27:23] <vargadanis> so basically if I carefully structure my DBs, DB-level write locks should not impact concurrent write performance as much as some bloggers claim (how crappy that is)
[13:28:54] <kali> vargadanis: the db-level write lock is rarely the issue
[13:29:01] <Nodex> you really should avoid dbrefs where possible
[13:35:06] <Nodex> the things people come up with amazes me
[13:35:22] <vargadanis> kali, what is usually the issue than?
[13:36:52] <kali> vargadanis: most of the time, people try to use mongodn as if it would be a relational engine, don't read the doc, and get bitten because it's not a relational engine
[13:37:33] <Nodex> + then blame MongoDB because it doesn't do [insert cool feature here]
[13:39:52] <vargadanis> well I am just researching my options.. I wanna learn more about NoSQL in general and MongoDB seemed like a good place to start
[13:42:00] <fxhp> I implemented "search" on my web application by accepting a regex from user, and using that with $regex on the data field
[13:42:18] <fxhp> Anything I should look out for when it comes to injection?
[13:43:31] <kali> fxhp: performance, in this case, would be more worrying. injection is not a problem, as there is no way the user can "escape" from the regexp string.
[13:44:03] <kali> fxhp: unless you craft json queries by concatenating string
[13:50:00] <vargadanis> as for write concerns go: if it is very important to me to make sure that all the information is written into the DB that I send to it or I get an error of that write operation, which level of write concern should I use?
[13:50:01] <fxhp> kali: naw, I'm just placing the string as the argument to $regex
[13:50:33] <Nodex> vargadanis : by default the write concern is set to safe writes
[13:51:21] <fxhp> kali: I agree regex could cause performance issues with very big datasets, so a better solution should be found in the future, but it currently works decently and it only a few lines of code.
[14:02:53] <kali> 12 replica suppose a huge read load
[14:03:19] <Nodex> vargadanis : a shard is exactly that .... it;'s a "shard" or "piece" of your total data
[14:03:26] <Derick> kali: they cause a lot of extra network overhead - and the election protocol doesn't really scale that well
[14:03:50] <Nodex> if you have 3 shards and you have equal shard keys then each shard will contain 1/3rd of your data
[14:04:00] <kali> Derick: i'm aware of that... i assume you were talking to vargadanis
[14:04:15] <Derick> kali: rather just in general :)
[14:04:17] <Nodex> if you have 3 replica sets on each shard then you still have 1/3rd on each shard but it's backed up 3 times each
[14:05:00] <vargadanis> ahha! alright, I'm getting there
[14:05:17] <Nodex> shards allow read/write scaling and also for parts of your data to be offline whilst keeping the remainder of your app online (i/e the other 2/3rd's)
[14:05:17] <kali> vargadanis: replica set is for 1/ high availibility and persistence, 2/ high read load. shards is for write scalability, and dataset size scalability in general
[14:06:05] <Nodex> replica sets do what kali just stated - mostly availability and read scaling... som,e people use them to have an exact copy of data for data warehouse tasks
[14:07:11] <vargadanis> such as analytics I suppose
[14:12:54] <whiskeynerd> I've just started learning node.js and mongodb and having a problem querying even after looking at the reference, can I get some help please?
[14:20:15] <Derick> whiskeynerd: it might be that it's just too fast and the inserts haven't been made yet by the time you run find
[14:20:59] <whiskeynerd> Derick: I had done the insert stuff in a different file before and the query in another and ran them separately and had the same problem
[14:21:10] <whiskeynerd> just combined the operations into one file for easier pastebin
[14:21:18] <Derick> add a console.log just before and after the find?
[14:21:24] <Nodex> whiskeynerd : can you go on the shell and see if the data made it?
[14:21:42] <Derick> also, what sort of whiskey do you like? /me is more of a whisky fan
[14:22:15] <whiskeynerd> canadian club. cheap but still tasty. you?
[14:23:17] <whiskeynerd> i haven't learned to use the shell yet. would it just be >mongo databaseName
[14:26:50] <Nodex> arf - winblows ... not sure how to on that
[14:28:31] <whiskeynerd> damn getting an error 1067 when trying to start it
[14:28:50] <whiskeynerd> I had followed the guide to set it up as a windows service so I thought it worked ill need to research this
[14:30:18] <whiskeynerd> Looks like I don't have enough space on my C drive... I don't have anything to get rid of though.
[14:30:22] <whiskeynerd> thanks for your help guys
[14:32:25] <whiskeynerd> I tried netstat --smallfiles before and it seemed okay but the service still says stopped. Oh well it was about time to reformat anyway
[14:37:38] <newbsduser> what is best way to check mongodb instance is up or down? ( localhost:27017) ??
[17:43:00] <Bluetegu> Hi. what is the best way to find only middle element in an array from each document? I can get the first or the nth element using $slice, but each document has an array of different size. Thanks.
[17:53:50] <WarDekar_> hi i'm trying to turn on auth and remote connect but i'm having difficulties, on the system DB i added a user with a role as "userAdmin"
[17:53:57] <WarDekar_> but i still can't login with that user i get login failed exception
[17:55:14] <Nodex> Bluetegu : you can get array elements with numbered indice
[18:27:06] <MANCHUCK> the only index on that collection is the _id index
[19:19:46] <starfly> MC: Perhaps our mileage varies on rolling upgrades; I'm sure there are scenarios where the oplog or RS dependent things change between releases, so e.g. you can't play a lower version oplog into a replica which is expecting a slightly different oplog structure. Not speaking from direct knowledge about the two releases in question, but musing. Probably best to report the issue, good luck.
[20:14:18] <dgarstang> I'm using the REST API... like this: curl http://apex.hub.foo.com:28017/truthdb/ec2_inventory/?filter__id=i-1415d559 ... output has offset, total_rows etc... which is too much info for upstream parser... can this be slimmed down?
[20:17:41] <akrs> hey guys - i'm using the aggregation framework to get articles sorted by number of comments (array on article object), but all i'm getting back is the _id and the commentsLength. how do I get back the full objects as well?
[20:18:25] <andredublin> what commands are you using now to produce your output?
[20:21:31] <mgriffin> why can't i reuse obj with find but can with findOne? http://privatepaste.com/9d43a43d99
[20:23:59] <scottbessler> find returns a cursor not an object or array
[20:25:34] <TommyCox> akrs: You use the project command after the aggregation to output the other wanted fields
[20:25:52] <scottbessler> i'm suddenly seeing corruption issues in mongo logs after restoring an ebs snapshot of a (journal-enabled) slave..
[20:26:17] <scottbessler> i've been restoring previous days snapshot daily for the last months and this seems possibly correlated to going from 2.2.x to 2.4.x
[20:26:21] <scottbessler> but that could be coincidental
[20:26:41] <dgarstang> no one here uses rest api? :(
[20:26:50] <scottbessler> is EBS snapshot not safe anymore? i thought it was recommended in the docs but then went looking and it doesnt seem to be mentioned anymore
[21:04:55] <mgriffin> is db.showings.insert({film:"Sharks 15",cinema:"Dollar",showtimes:{showtime:"3:30",showtime:"7:30",showtime:"9:30"}}) the answer hopeless was looking for?
[21:06:17] <kali> mgriffin: i think the answer was "aggregation framework"
[21:06:31] <kali> mgriffin: maybe a hint about stacking two $group
[21:09:01] <kali> mgriffin: "aggregation framework" is the right answer to half of the questions asked here anyway :)
[21:10:41] <mgriffin> i see, he wanted multiple documents and "group by film, cinema"
[21:11:31] <mgriffin> so nesting as i did could work(?) but is different schema, and agg framework is the approach he really wanted do to application design
[21:11:33] <kali> group by film,cinema, and then group by film