PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 4th of March, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[01:00:04] <NyB> Hi! Is there a way to get mongod to listen on two different ports?
[01:03:45] <rkgarcia> NyB: diferent ports or IP's?
[01:05:32] <NyB> rkgarcia: I'd like it to listen on two different ports for client connections
[01:05:51] <NyB> 27017 and another one...
[01:06:58] <cheeser> nope
[01:07:38] <rkgarcia> NyB: nop, but you can forward traffic from X port to default port >_<
[01:07:47] <rkgarcia> using firewall or something else
[01:08:04] <NyB> rkgarcia: yeah, I was hoping to avoid that...
[01:08:08] <NyB> oh well..
[01:08:24] <NyB> it's not a big deal, really...
[01:08:38] <rkgarcia> NyB: yep
[02:19:07] <ddod> Question: I have a db of articles in different categories. Is there a single query to get a per-category limit? As in, 10 articles from each category. Bonus points for the node-mongodb-nativeā€Ž query. My current query: articles.find({categories: { $in: ['news', 'opinion'] }).sort({'date': -1}).limit(10).toArray()
[02:22:07] <Node_034> Question: I have a question regarding Mongoose queries. I have a database of posts in various threads, when I query for a group of threads I can usually populate them when I've queried for them. However, how would I go about populating the posts inside the group of threads?
[02:26:06] <rkgarcia> ddod an Node_034 are the same?
[02:26:12] <Node_034> no
[02:26:39] <ddod> nope
[02:26:58] <Node_034> basically just wondering if i can populate an array of subdocuments
[02:27:26] <rkgarcia> ddod: you need the top 10 articles for each category?
[02:27:38] <ddod> rkgarcia: yeah, sorted by latest
[02:27:43] <rkgarcia> Node_034: you need aggregation framework
[02:28:10] <rkgarcia> in single query i think that's imposible :D
[02:28:14] <rkgarcia> :S
[02:28:47] <Node_034> thanks I'll read the docs on it
[02:30:46] <rkgarcia> ddod: you can use aggregation framework?
[02:31:02] <rkgarcia> please use pastebin for article example
[02:31:10] <ddod> not sure what you mean
[02:31:16] <ddod> I'm a complete noob to mongodb
[02:31:27] <rkgarcia> ddod: me too
[02:31:54] <rkgarcia> aggregation framework allow to do groups and advanced queries
[02:32:28] <ddod> I think I may end up just async to chain them
[02:46:47] <rkgarcia> ddod: paste data in a pastebin
[02:47:15] <rkgarcia> ddod: http://pastie.org
[04:32:09] <jfisk1987> hey everyone
[04:32:49] <jfisk1987> is it possible to setup user accounts with only readonly access?
[04:32:52] <jfisk1987> im a bit of a newb
[04:38:03] <felixjet> what is upsert?
[04:38:31] <felixjet> creating a document if it doesn't exist while trying to edit it?
[06:26:36] <jithinoc> hello world
[06:54:49] <felixjet> im confuse about save and update :(
[06:55:22] <felixjet> Alternately, db.collection.save() replaces an existing document with the same _id field.
[06:55:25] <felixjet> what does this mean?
[06:55:29] <felixjet> update does the same
[08:50:23] <palominoz> Hello there. Any suggestions or best practice for architecturing a localized data model on mongodb? i am looking at objectives 1. reducing effort(SLOC to serialize / deserialize objects) to respond to HTTP Content-language headers 2. mantain high performance on queries even with lots of data
[08:58:48] <Nodex> how about asking the question without using big fancy words?
[08:59:03] <murali> in simple words....
[09:02:50] <palominoz> ok. sorry for the big words. i was wondering where to store localized attributes of my documents, while keeping clean source code and mantain high performance. is it more clear?
[09:03:49] <Nodex> what do you mean by localized attributes?
[09:04:13] <palominoz> e.g. Product : { name: "my localized string" }
[09:04:43] <Nodex> right, so you want to do a load of joins in effect ?
[09:05:12] <palominoz> one solution could be Product : { locales: { en: { "name": "Car"}, it:{"name":"Automobile" }}}
[09:05:20] <Nodex> that's how I would do it
[09:06:00] <palominoz> I would like to keep joins at minimum
[09:06:12] <Nodex> you should aim to have ZERO joins
[09:06:19] <Nodex> ergo I would do it like you have stated
[09:06:55] <palominoz> i dont really like the doubled keys in locales. what do you think?
[09:07:31] <Nodex> you don't really need the double key. locales : {en:"Foo",it:"bar"....}
[09:07:51] <Nodex> however if you need more than 1 attribute per product then you will need the key
[09:10:06] <palominoz> is this pattern already in use for other projects you know?
[09:11:14] <Nodex> I couldn't say, it's certainly the most performant against joins
[10:17:21] <scottyob> Howdy, I'm wondering how to get Timestamp(1393927193, 0) into something more human readable
[10:20:45] <Nodex> in your server side language
[10:21:23] <scottyob> Nodex: so can't do it in the Node shell? That's all good, what's the number represent? 1393927193
[10:23:08] <Nodex> an epoch most likely. It's your data, you shoud know :)
[10:24:24] <scottyob> hehe, Thanks
[10:30:40] <ssapphiree> hi all! can you help me pls? I'm trying to figure out how to make a query I need
[10:31:03] <ssapphiree> I need to find a record in DB where array field exactly matches the array I have
[10:31:31] <ssapphiree> I only found $elemMatch operator in manual, but it's not quite what I need...
[10:32:05] <Nodex> please pastebin a typical document and the qquery you need
[10:32:55] <McSorley> When using mongoimport, is it possible to specify the delimiter of a CSV file?
[10:33:22] <kali> scottyob: have considered using Date and not Timestamp ? Timestamp is mostly for internal use
[10:33:41] <scottyob> kali: don't have much choice. pmacct is populating the DB
[10:34:19] <kali> great
[10:37:58] <ssapphiree> Nodex: http://pastebin.com/Gtbgthuy
[10:38:01] <ssapphiree> like that
[10:38:17] <ssapphiree> (that's node.js & mongoose if it matters)
[10:39:34] <Nodex> ssapphiree : have you tried it how you have laid it out?
[10:40:06] <ssapphiree> yeah, it doesn't match anything
[10:40:49] <Nodex> have you tried $all ?
[10:41:20] <ssapphiree> nope, give me a minute...
[10:41:30] <Nodex> http://docs.mongodb.org/manual/reference/operator/query/all/#use-all-with-elemmatch
[10:43:10] <ssapphiree> thanks :) gonna try it
[10:57:44] <ssapphiree> yeah, looks like it worked
[10:57:46] <ssapphiree> thanks Nodex :)
[11:05:30] <Nodex> no probs
[11:24:53] <KraK> Hello, I have a php host and I wanted to know if there is a way to have my own Mongodb server on it so I could use it for angularjs, thanks
[11:28:25] <Nodex> eh?
[11:31:15] <kees_> if you can install and run anything you can get your own mongodb server yes
[11:32:51] <KraK> The reason I want to do this, is I don't have enough money to get a mongodb server ...
[11:33:08] <KraK> I'm using mongolab.com free offer
[11:33:32] <KraK> I won't have more than 50 entries and less than 200 requests per day
[11:33:40] <KraK> Should I keep the free option or try to get a paid one ?
[11:33:55] <KraK> or *should I get a paid one
[11:34:09] <kees_> that 'php host' can you install anything on it?
[11:34:46] <KraK> I don't think so, I just checked their FAQ, you need to get a VPS and install it on it
[14:58:14] <spicewiesel> hi all, just a short question: I enabled profiling via db.setProfilingLevel(1,50) on all mongod instances in the replicaset. Today, 2 weeks later, the profiling level was back to 0 at the hosts. Does anyone know how this can happen?
[15:24:38] <joannac> spicewiesel: the instance was restarted? or someone changed it back?
[15:25:40] <spicewiesel> will this be resetted with a restart?
[15:26:03] <spicewiesel> I thought only the content of the used capped collection will be flushed, not the profling setting itself
[15:31:56] <joannac> Nope, gets reset on restart
[15:32:36] <joannac> you can set it on the command line: mongod --profile=1 --slowms=15
[15:36:52] <Striki> how fast is count with 1 regex match? the field is indexed but the collection has 525 million documents. I've read about issues with slow count queries, just wondering what the status of it is today. the regex match is in the recommended form, with "starts at" and "ends at", checks for 49 symbols on 1 indexes field
[15:37:31] <Striki> over 4 shards
[15:39:07] <Nodex> count is always slow
[15:39:21] <Nodex> + with regards to having a query
[15:39:26] <Striki> is it any faster to get a cursor and do a count on the cursor?
[15:39:35] <Nodex> it's only fast when counting without a query becuase it uses internal counters
[15:39:42] <Striki> guess it's the same
[15:39:43] <Striki> ok I see
[15:40:01] <Nodex> iirc there is speed improvements coming to count() pretty soon
[15:41:17] <Striki> ok
[15:41:19] <Striki> thanks for your help
[15:41:36] <Nodex> no problemo
[16:01:13] <bensons> hi, if i have sharding active for a collection, hashed as sharding key; when i now add a new shard (replset) data will be reblanaced. is there any way to avoid that for hased shardkey?
[16:06:19] <kali> bensons: well, you can stop the balancer, but what's the point ?
[16:07:21] <bensons> kali: well lets say i have 3 shards(replsets) and i want 1 collection to be spread across shard1/shard2 and another across shard2/shard3
[16:08:03] <kali> well, stop the balancer and move the chunks yourself
[16:08:16] <kali> i'm not sure if that is really recommended
[16:08:27] <kali> you'd better check out what the documentation says :)
[16:08:44] <bensons> well that is not covered
[16:08:54] <bensons> sure i can manually set split points and move chukns
[16:09:10] <bensons> but since the sharding key is id hashed its not possible (from what i understand) to set split points
[16:14:20] <kali> bensons: what about this ? http://docs.mongodb.org/manual/reference/command/split/#split-a-chunk-using-values-of-a-hashed-shard-key
[16:17:16] <bensons> kali: yeah ok that could work :)
[17:10:08] <Rhaven> Hello, i'm using mms and i have some troubles with sharded cluster detection through a mongos. There is no other member except the mongos used for the detection.
[17:45:37] <andrewjacobs> hello everyone, i am using the latest mongodb and C# library, I am running into an error when I try to populate a object[] with a query contain email
[17:46:51] <andrewjacobs> http://pastebin.com/Dxq1ELcZ is a sample code
[17:47:19] <andrewjacobs> it throws an exception when trying to execute var result
[17:54:14] <andrewjacobs> It produces this exception: http://pastebin.com/wEGXLxzJ
[18:29:55] <dmarkey> if i have two documents {"version" : "2.0"} and {"version": "3.0"} , can I do an aggregate query to count the different versions and the total?
[18:45:50] <Rhaven> Hello, i'm using mms and i have some troubles with sharded cluster detection through a mongos. There is no other member except the mongos used for the detection.
[18:47:03] <rkgarcia> Rhaven.question.explain()
[18:47:30] <rkgarcia> what's your problem Rhaven ?
[18:59:40] <Rhaven1> @rkgarcia: im trying to pull my sharded cluster via a mongos instance in mms.
[19:00:16] <rkgarcia> do you have agent logs?
[19:00:24] <Rhaven1> Yes
[19:02:06] <Rhaven1> But nothing about pulling the informations about my cluster
[19:34:23] <tristan1990> Hey guys. I have a problem connecting MongoDB to Node. If anybody could help then I have detailed the setup here - http://pastebin.com/ENx9S7M6
[19:37:17] <a13x2121> i added a new user to db admin, i can authenticate but getting a unauthorized when running show dbs
[19:39:23] <a13x2121> user has role userAdmin
[20:18:25] <rkgarcia> tristan1990: whats the problem?
[20:18:31] <rkgarcia> show your code
[20:18:32] <rkgarcia> :)
[20:23:47] <tristan1990> Hey, I've followed this tutorial which builds this: https://github.com/ccoenraets/directory-backbone-bootstrap
[20:23:55] <tristan1990> it all works great
[20:24:08] <tristan1990> what I want to do it connect it to an external database now
[20:24:44] <tristan1990> I am also using this with the above https://github.com/ccoenraets/cordova-tutorial/blob/master/www/js/adapters/jsonp-adapter.js
[20:25:15] <tristan1990> so basically I fire up the mongoDB, nodeJS server and then the node app works
[20:25:42] <tristan1990> I want to now connect that code to my MongoLab hosted DB, rather than running locally
[20:26:05] <tristan1990> The problem is that I don't know where to start to connect it
[20:26:26] <tristan1990> Above is a pastebin explaining the setup in a bit more detail
[20:33:57] <rkgarcia> I don't know the problem tristan1990 :(
[20:34:47] <tristan1990> rkgarcia: I thought I had a problem but actually I think I just need some help and fresh thinking on the project :(
[20:35:04] <rkgarcia> ok, explain
[20:35:16] <tristan1990> Okay..
[20:35:33] <tristan1990> I have a rather large MongoDB hosted on MongoLabs
[20:35:54] <tristan1990> The DB is full of Opening Time information for shops in the UK.
[20:36:29] <tristan1990> I want to make a really simple app using PhoneGap that just searches the MongoDB for the shop the user wants
[20:37:19] <tristan1990> I thought a good place to start would be using a tutorial for PhoneGap to create an employee directory. My thinking was that it had a simple search bar that searches for content on a mongodb (local)
[20:38:27] <tristan1990> The tutorial worked and I have edited the looks of the app to meet my requirements. I want to now make the app read the MongoLabs hosted database rather than the one I started running on my mac
[20:39:32] <tristan1990> this is the tut I followed - https://github.com/ccoenraets/directory-backbone-bootstrap and I added the extra file - directory-rest-nodejs from the same guy's github.
[20:40:04] <tristan1990> This worked so that I started the mongodb, started up nodejs server and then I could use the app as per the tutorial.
[20:40:16] <rkgarcia> i know node, i don't use cordova (PhoneGap)
[20:40:22] <tristan1990> Basically from here I want to connect it to my external DB
[20:40:46] <rkgarcia> ok, in node you need "npm install mongodb"
[20:40:53] <rkgarcia> this install the mongodb driver for node
[20:41:12] <tristan1990> actually cordova is irrelevent.. It's standard node stuff, i just use cordova to build it after. If i can get it working in node, I can get it working in cordova
[20:41:20] <tristan1990> cool. already have that installed
[20:41:29] <rkgarcia> in your node app "var MongoClient = require('mongodb').MongoClient;"
[20:42:04] <rkgarcia> MongoClient.connect('mongodb://127.0.0.1:27017/test', function(err, db) {
[20:42:04] <rkgarcia> if(err) throw err;
[20:42:04] <rkgarcia> });
[20:42:22] <rkgarcia> the last three lines, connect to mongodb server
[20:43:22] <rkgarcia> for example to select a collections you need "var myCollection = db.collection('myCollectionName');"
[20:43:33] <tristan1990> Okay. This is my node app I think https://gist.github.com/anonymous/9908269e2be7b138441d
[20:43:34] <rkgarcia> tristan1990: https://github.com/mongodb/node-mongodb-native
[20:44:02] <tristan1990> excellent
[20:44:18] <tristan1990> So you would say that the link you just pasted me is the best way to do it?
[20:44:52] <rkgarcia> tristan1990: is one solution of many others,
[20:45:02] <rkgarcia> you can use mongoose
[20:45:07] <rkgarcia> !help
[20:45:07] <pmxbot> !8ball (8) !acronym (ac) !anchorman !annoy (a, bother) !bender (bend) !bitchingisuseless (qbiu) !blame !bless !boo !bottom10 (bottom) !calc !chain !cheer (c) !c
[20:45:07] <pmxbot> ompliment (surreal) !config !ctlaltdel (controlaltdelete, controlaltdelete, cad, restart, quit) !curse !dance (d) !danke (dankeschoen, ds, gm, germanmotivate) !
[20:45:07] <pmxbot> deal !define (def) !demotivate (dm) !disembowel (dis, eviscerate) !duck (ducky) !embowel (reembowel) !emergencycompliment (ec, emercomp) !esperantomotivate (em)
[20:45:07] <pmxbot> !excuse (e) !featurecreep (fc) !fight !flip !fm (frenchmotivate) !fml !gettowork (gtw) !golfclap (clap) !google (g) !grail !haiku !hal (2001) !hangover !help (
[20:45:08] <pmxbot> h) !hire !imotivate (im, ironicmotivate) !insult !jm (japanesemotivate) !job (card) !karma (k) !keelhaul (kh) !klingon (klingonism) !lm (latinmotivate) !log !lo
[20:45:08] <pmxbot> go !logs !lunch (lunchpick, lunchpicker) !meaculpa (apology, apologize) !motivate (m, appreciate, thanks, thank, gracias) !murphy (law) !nailedit (nail, n) !nas
[20:45:08] <pmxbot> tygram (nerf, passive, bcc) !norris () !notify !oregontrail (otrail) !panic (pc) !password (pw, passwd) !paste !pick (p, p:, pick:) !pm (piratemotivate) !progre
[20:45:09] <pmxbot> ss !quote (q) !r (r) !resolv !roll !rubberstamp (approve) !saysomething !send_text !simpsons (simp) !stab (shank, shiv) !storytime (story) !strategy !strike !tg
[20:45:09] <pmxbot> if !therethere (poor, comfort) !ticker (t) !time !tinytear (tt, tear, cry) !top10 (top) !troutslap (slap, ts) !urbandict (urb, ud, urbandictionary, urbandefine,
[20:45:09] <pmxbot> urbandef, urbdef) !version (v, e, r) !weather (w) !where (last, seen, lastseen) !wolframalpha (wa) !zinger (zing) !zoidberg (zoid)
[20:45:48] <tristan1990> Which would you say is the easiest learning curve?
[20:45:52] <rkgarcia> ./msg pmxbot !help
[20:46:10] <rkgarcia> tristan1990: yep, mongodb driver native is easy to use
[20:46:14] <tg> !tg
[20:46:32] <tristan1990> ace. I'll start with that. Thank you very much rkgarcia ;)
[20:46:48] <rkgarcia> mongoose adds some features as validations, schemas, etc etc :)
[20:47:01] <rkgarcia> tristan1990: you are welcome
[20:47:59] <tristan1990> Okay, just checking. Using node-mongodb-native is it possible to have a search bar? (I realise that may be a ridiculous question)
[20:49:45] <rkgarcia> autocomplete?
[20:49:59] <tristan1990> yes
[20:50:00] <tristan1990> ideally
[20:51:35] <rkgarcia> tristan1990: the limits are our minds :P
[20:51:55] <tristan1990> haha. excellent - I'm screwed! ;)
[20:56:11] <tristan1990> rkgarcia: I've looked at this before - totally forgot
[20:56:18] <tristan1990> var host = process.env['MONGO_NODE_DRIVER_HOST'] != null ? process.env['MONGO_NODE_DRIVER_HOST'] : 'localhost';
[20:56:19] <tristan1990> var port = process.env['MONGO_NODE_DRIVER_PORT'] != null ? process.env['MONGO_NODE_DRIVER_PORT'] : 27017;
[20:56:39] <tristan1990> thats in the .js file example
[20:56:41] <tristan1990> mongodb://<dbuser>:<dbpassword>@ds037737.mongolab.com:37737/openingtimes
[20:56:44] <tristan1990> thats my info
[20:56:59] <tristan1990> how does my info translate to the two lines above
[20:59:06] <rkgarcia> you need use enviroment vars in mongodburi?
[21:01:09] <rkgarcia> D: excuseme tristan1990 :P
[21:01:16] <tristan1990> I'm not sure. I've opened an example from the git you sent me and these are at the top
[21:01:41] <rkgarcia> use pastie :D
[21:04:28] <tristan1990> Okay, so this is the queries.js example in the examples folder of the git I have cloned and done npm install in the same folder of
[21:04:32] <tristan1990> http://pastie.org/8863075
[21:04:48] <tristan1990> and this is my database login info - mongodb://<dbuser>:<dbpassword>@ds037737.mongolab.com:37737/openingtimes
[21:04:59] <tristan1990> the collection is called "stores"
[21:07:26] <rkgarcia> change the mongodb uri
[21:07:42] <rkgarcia> MongoClient.connect(format("mongodb://%s:%s/stores?w=1", host, port), function(err, db) {
[21:07:47] <rkgarcia> sorry
[21:07:53] <rkgarcia> the collections is stores :P
[21:08:50] <tristan1990> Okay, got another problem (surprise!) im getting this trying to install mongodb
[21:08:51] <tristan1990> npm WARN install Refusing to install mongodb as a dependency of itself
[21:10:40] <rkgarcia> tristan1990: you clone the repo?
[21:10:46] <tristan1990> yeah
[21:11:01] <rkgarcia> you don't need npm install then :P
[21:12:00] <tristan1990> ahhh okay.
[21:12:02] <tristan1990> node queries.js
[21:12:13] <tristan1990> Error: Cannot find module '/Users/tristankirkpatrick/Documents/openingtimes/node-mongodb-native/queries.js'
[21:12:18] <rkgarcia> >_<
[21:12:28] <rkgarcia> ok please create a dir in other place
[21:12:32] <tristan1990> okay
[21:12:39] <rkgarcia> an copy the queries.js in
[21:12:51] <rkgarcia> and now npm install mongodb
[21:12:56] <rkgarcia> modify the first line
[21:13:14] <rkgarcia> var MongoClient = require('../lib/mongodb').MongoClient
[21:13:21] <rkgarcia> replace with var MongoClient = require('mongodb').MongoClient
[21:14:17] <tristan1990> done
[21:14:46] <rkgarcia> test node queries.js
[21:15:21] <tristan1990> Connecting to localhost:27017
[21:15:36] <tristan1990> TypeError: Cannot call method 'dropDatabase' of null
[21:15:41] <rkgarcia> localhost or external only change the URI
[21:15:54] <rkgarcia> then you aren't connected to server
[21:16:28] <tristan1990> I'm really sorry. where do I change the URI?
[21:18:10] <rkgarcia> in MongoClient.connect
[21:18:35] <tristan1990> currently it's this - MongoClient.connect(format("mongodb://%s:%s/stores?w=1", host, port), function(err, db) { db.dropDatabase(function() {
[21:18:51] <tristan1990> do I put in the full URI from MongoLab
[21:19:01] <tristan1990> mongodb://<dbuser>:<dbpassword>@ds037737.mongolab.com:37737/openingtimes
[21:19:10] <rkgarcia> for testing now please
[21:19:14] <tristan1990> obviously with my username and pass in
[21:19:18] <tristan1990> okay
[21:19:19] <rkgarcia> yes
[21:20:12] <tristan1990> Error: database names cannot contain the character ' '
[21:20:27] <tristan1990> Do i need to change these too:
[21:20:32] <tristan1990> var host = process.env['MONGO_NODE_DRIVER_HOST'] != null ? process.env['MONGO_NODE_DRIVER_HOST'] : 'localhost';
[21:20:33] <tristan1990> var port = process.env['MONGO_NODE_DRIVER_PORT'] != null ? process.env['MONGO_NODE_DRIVER_PORT'] : 27017;
[21:20:48] <rkgarcia> paste your connection line
[21:21:27] <tristan1990> MongoClient.connect(format("mongodb://tristan:po81*@ds037737.mongolab.com:37737/openingtimes", host, port), function(err, db) { db.dropDatabase(function() {
[21:21:51] <rkgarcia> use
[21:22:12] <rkgarcia> MongoClient.connect("mongodb://user:pass@ds037737.mongolab.com:37737/openingtimes", function(err, db) {
[21:22:24] <rkgarcia> and change your user and password from mongolab please >_<
[21:22:42] <tristan1990> I starred out the pass and changed the letters
[21:23:27] <betty> Is there some way that you can estimate the size for an index?
[21:23:39] <tristan1990> Users/tristankirkpatrick/app/queries.js:101
[21:23:39] <tristan1990> });
[21:23:39] <tristan1990> ^
[21:23:40] <tristan1990> SyntaxError: Unexpected token }
[21:23:58] <tristan1990> Just tried node queries.js and it returned above ^
[21:24:00] <spa-dev> hi
[21:24:35] <spa-dev> I have a data modeling question - is this the right place to ask about it?
[21:24:46] <rkgarcia> betty: in the db use db.collection.stats()
[21:25:42] <spa-dev> I suspect I might be thinking about it too relationally
[21:26:11] <rkgarcia> spa-dev: answer
[21:26:23] <rkgarcia> >_< my english is bad :S
[21:26:32] <rkgarcia> excuseme for that
[21:26:46] <spa-dev> basically I've got a collection of users and a collection of a hierarchy of groups
[21:26:57] <spa-dev> users are associated with groups via a list of roles
[21:27:09] <spa-dev> (this is for a user management system)
[21:27:13] <rkgarcia> ok
[21:27:39] <spa-dev> so on my users collection, I have a an array of objects that include the group id and a collection of roles
[21:28:03] <spa-dev> but that seems to make it complicated to work with using any of the standard mongo tools in nodejs like mongoose
[21:28:04] <rkgarcia> tristan1990: do you know the nodejs lang?
[21:28:27] <rkgarcia> why?
[21:29:18] <spa-dev> example user might be { username:'user', groups: [{groupid:ObjectId, roles: ['user', 'special thing']}]}
[21:29:36] <spa-dev> but I'm not sure how to populate that using something like mongoose
[21:29:51] <spa-dev> and actually the roles array is actually an array of role ids :)
[21:29:54] <spa-dev> not just strings
[21:29:57] <rkgarcia> D:
[21:30:12] <spa-dev> but i'd be happy if I could get that far
[21:30:15] <tristan1990> rkgarcia - no, I bet you guessed!
[21:30:22] <spa-dev> does this seem overly complex?
[21:30:30] <rkgarcia> tristan1990: for money i can do for you
[21:30:31] <rkgarcia> >_<
[21:30:35] <rkgarcia> spa-dev: isn't
[21:30:37] <spa-dev> is there a more mongo-esque way of doing this?
[21:30:46] <spa-dev> ah ok cool
[21:30:51] <rkgarcia> Time to lunch
[21:30:52] <rkgarcia> :D
[21:38:39] <betty> rkgarcia: yea, I know about stats() function, I was wondering if for planning purposes I might estimate what the indexSize will be before creating them. I'm the planning stages of a project and need a rough idea of initial storage needs and cost
[21:42:32] <tristan1990> rkgarcia: I've PM'd you.
[22:16:19] <rkgarcia> betty: http://stackoverflow.com/questions/8607637/are-there-any-tools-to-estimate-index-size-in-mongodb
[23:45:44] <niftylettuce_> hey guys im trying to some advanced query, wondering if you can help ... http://stackoverflow.com/a/11418489 basically this but instead of having to do docs.filter I want to just do something like `.where({ tags: { $ne: null }) ... so it filters out anything that doesn't have tags populated