[00:58:44] <Richhh> how can i use mongodb like a key value store, or a big array where i know the index i'm looking for?
[00:59:24] <Richhh> such that it wont iterate through anything
[01:04:48] <preaction> Richhh: every document you add to a collection has an ID. you use that ID to look up the document
[01:24:31] <langemann> Ok. I have multiple documents with the same key "category" and "subCategory", one "category" can have multiple "subCategory". Can I do a query of some sort to generate a document which is formed like this: category: "someCategory"{ all subCategories }?
[01:32:03] <Richhh> preaction: i believe in that case mongodb still iterates over all the documents in the collection to find the matching id, right?
[01:33:30] <preaction> the id is automatically indexed. it may have to scan the index to find your ID, but it could also build a tree out of the IDs or other ways to speed up index lookups
[06:00:24] <george2> I'm trying to do radius of gyration on a Mongo dataset to remove documents that move too far, too fast. Can anyone tell me if this is remotely possible in Mongo? http://i.imgur.com/dFgHdWR.png
[06:07:44] <samurai2> george2 : I think that possible, but you need to implement the function to do that by yourselves and maybe add some geolocation or aggregation framework to help filter the data. :)
[06:08:10] <george2> samurai2: I'm using GeoJSON on a 2dsphere, will that work?
[06:09:26] <samurai2> george2 : but if you said the location data on the mongodb dataset, then I guess you need to use geosphere filter in mongodb
[06:10:12] <samurai2> george2 : like in this link http://docs.mongodb.org/manual/applications/geospatial-indexes/
[06:11:05] <samurai2> george2 : I haven't used it a lot, but I guess you can try. :)
[06:14:15] <george2> samurai2: Yeah, I have all my data in a 2dsphere index in a mondo database, and am using Mongo's built-in GeoJSON support to store a single Coordinate point in each document. My problem is, I have no idea how to implement a formula like that using just mongo aggragations and such.
[06:14:44] <george2> my dataset is large enough that I can't do much to it outside of mongo
[06:17:27] <samurai2> george2 : then, I think you can use map/reduce in mongodb
[06:17:55] <george2> ok, I'll look into that, thanks.
[08:44:00] <jeanre> anyone around might want to help me design a data schema
[08:46:33] <ncls> jeanre: explain your problem and we'll tell you
[08:51:08] <ncls> you can do a simple "relational-like" schema, with 3 collections (book, pages, comments) by storing for each entry the id of its parent (parent book or parent page)
[08:51:51] <ncls> if you want a simple nested schema you can actually use array, and use the index of each element to handle it, for example
[08:52:46] <ncls> or you can use some of the "native" relational functions of mongodb, but I don't know how it's implemented in Mongoose for NodeJS
[08:52:46] <puppeh> if I have a unique index on a field, is there the possibility of having duplicated objects in a multi-threaded environment?
[08:53:20] <puppeh> in other words, do I need to synchronize the access or mongodb guarantees that there won't be any duplicate records because of the unique index?
[08:57:00] <ncls> puppeh: I think mongodb guarantees that
[09:03:55] <jeanre> the problem is the array in array
[09:04:10] <puppeh> ncls: thanks but I need someone to tell me for sure :P
[09:05:10] <ncls> jeanre: in your book object, you could also store an array of pages, and an object "comments" like {page_number : [array of comments ]}
[09:32:51] <ncls> mongodb and mongoose (as I know it in Perl) is awesome when you store objects and you want them to be "flexible"
[09:33:24] <ncls> for example, a User database in which you will be able to add fields and data very easily
[10:28:46] <kubber> hi guys, i don't know if it's mongo or node issue but .. when i new Date() in node i get os system timezone date, but if i do it in record.update or insert ( {date:new Date() } ) into mongo i get different timezone -> the one that i was using when i was installing mongodb ... is there a setting for this ?
[11:05:40] <theblackbox> hello all, I'm looking for a way to start mongodb as a service - at the moment running mongos locks the terminal to that running instance and I want to be able to script the init... also something like Forever would be an advantage for persistence
[14:42:29] <tiller> I haven't try to write the query yet, that's why I'm just asking you if you think it's worth it to try to write such aggregate (and if it's possible):
[14:42:37] <tiller> SELECT * FROM myCollection WHERE myAttr = myValue GROUP BY parentId HAVING theDate = max(theDate)
[14:43:15] <tiller> I want to retrieve the latest (according to "theDate") documents of my collection for each parentId
[14:45:29] <tiller> (and in fact, I'm not sure my SQL-query is right. It's been a while since I wrote one ;o)
[14:52:06] <landstalker> we have a query which fires off now and again but is too large to provide information about what it's doing. This happens fairly regular. I was after suggestions on detective work
[14:56:13] <landstalker> I've already reviewed the data from db.currentOp and we're runnng 1.8.5
[15:26:03] <pbandyop> Mon Jan 20 15:10:19.742 [initandlisten] recover : no journal files present, no recovery needed
[15:26:03] <pbandyop> Mon Jan 20 15:10:19.742 [initandlisten]
[15:26:03] <pbandyop> Mon Jan 20 15:10:19.742 [initandlisten] ERROR: Insufficient free space for journal files
[15:26:03] <pbandyop> Mon Jan 20 15:10:19.742 [initandlisten] Please make at least 3379MB available in /var/lib/mongodb/journal or use --smallfiles
[15:26:04] <pbandyop> Mon Jan 20 15:10:19.742 [initandlisten]
[15:26:06] <pbandyop> Mon Jan 20 15:10:19.743 [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
[15:26:09] <pbandyop> Mon Jan 20 15:10:19.743 dbexit:
[15:26:15] <pbandyop> This demonstrates that the server has no more space available for journal. Will allocating more space to the server automatically solve the problem or do I need to manually do something to commit the new allocated space?
[15:36:35] <redShadow> hi guys! I'm looking for a way to $unwind sub-documents in the main collection (i.e. have them as pure results, instead of wrapped in a single-key object) ---> http://paste.pound-python.org/show/70z9FRuV87jwf0w3rKeO/
[15:37:02] <redShadow> (of course I can unwrap them in my application, but I want something cleaner if possible :))
[15:48:51] <pbandyop> What is pastebin? i am new, so don't knw abt it
[15:50:22] <kali> pbandyop: http://pastebin.com/ . use it when you want to show more than one line of code/text to someone on irc. pasting multiple line on IRC is considered rude
[15:58:28] <pbandyop> @Kali and then should i provide the link here?
[16:13:30] <kali> dviramontes_: you're obviously using mongodb through some kind of framework. you should tell use what it is to get some kind of answer
[16:17:00] <dviramontes_> ahh yeah, im using mean.io with mongoose adapter
[16:18:01] <dviramontes_> so express with angular frontend
[19:07:14] <Ineentho> at /var/log/mongodb/mongodb.log
[19:12:38] <tjbiddle> Hey guys - Apologize in advance for the noob questions. I don't have any experience with mongo, but I'm babysitting some systems for the next couple weeks and I need to setup mongo on one of them. I've used the database I need, and when I go to create the user I get "couldn't add user: not master" - Any suggestions?
[19:55:44] <_pash> hello, are symlinks possible in mongo? what i meas is if i have an entry in one collection who is a participant of another entry in another collection?
[19:56:09] <_pash> and by one query i would want to see all the participants of the entry in the second collection?
[21:40:26] <DrStein> Hi. I replaced a config server (new hostname). After the restart, it seems to have wiped out all the data from the configdb directory. Is that expected or did I do something wrong?
[22:01:26] <mst1228_> hey. is there any way to limit the length of an array in a model with a number field in the same model?
[22:53:09] <Industrial> Should I use mongodb for log messages? If so, could I name them by 'channel'? How would I efficiently get a list of channel names (for an index page)?
[22:55:43] <Industrial> oh, hello there http://docs.mongodb.org/ecosystem/use-cases/storing-log-data/