[10:14:17] <LukeOne> When importing big CSV files with 500k rows each, mongoimport confirms the import and the correct count but if I'm counting the collection around 750k entries the collection doesn't change the count anymore.
[10:14:32] <LukeOne> But the import confirms the import though
[11:16:46] <kephu> I'm trying to figure out a thing with aggregation: I've got a bunch of documents with performance variables (say, user,sys,idle). I'd like to be able to get an array containing all the data from those variables, as arrays themselves
[11:17:21] <kephu> like {data: [[user1,user2,user3], [sys1,sys2,sys3],[idle1,idle2,idle3]]}
[12:11:05] <StephenLynx> >This will rename your existing .mongorc.js file to .mongorc.js.orig and link mongo_hacker.js to .mongorc.js in your home directory
[12:14:06] <StephenLynx> and excuse me for having standards for software, it doesn't mean I am insecure, just that I don't run any random crap I find on the internet.
[12:14:34] <StephenLynx> specially proprietary crap on stuff that is meant to be secure.
[13:39:19] <christo_m> hello, im trying to query a subcollection.. namely, an item that has a user in it .. but when i try to do a query like { 'user._id': objectIDHERE } it fails to return
[13:39:44] <christo_m> how should i do the query? ive tried nesting it also like { user: { _id: objectIDHERE } }
[14:06:49] <amitprakash> Hi, is logging/profiling in mongodb blocking or non blocking?
[14:07:22] <amitprakash> Specifically, I want to log all mongodb queries without impacting execution times.. How can I achieve this?
[14:32:21] <Xat`> any idea why I get this error when the script use sleep() ?
[14:40:07] <yopp> Hum. I've got a collection with two indexes: on _id and on another field (something_id). It got 4 records. And I'm seeing this: http://pastie.org/private/4oldt2r3umt0zj7bvduta
[15:31:42] <christo_m> im trying to query a sub object with an _id ..
[15:32:02] <christo_m> ive read the docs , tried this: http://stackoverflow.com/questions/28665271/find-subdocument-by-id-inside-a-array-field-of-nested-object , still won't come up in results
[15:32:03] <obiwahn> Is there #mongodb-users or something? I see people joining and asking something but not many get a response
[15:35:24] <christo_m> i mean im just asking a basic query question , i guess that's why
[15:38:03] <symbol> christo_m: I didn't see your question, paste again?
[15:38:13] <christo_m> hello, im trying to query a subcollection.. namely, an item that has a user in it .. but when i try to do a query like { 'user._id': objectIDHERE } it fails to return
[15:38:18] <christo_m> how should i do the query? ive tried nesting it also like { user: { _id: objectIDHERE } }
[15:38:24] <symbol> obiwahn: There's a users group on google that's helpful, http://groups.google.com/group/mongodb-user/
[15:42:35] <symbol> I don't use mongoose...checking.
[15:44:17] <symbol> It appears that Mongoose should be handling that for you. christo_m: run the same query in the shell and see if it returns any results.
[16:01:39] <pokEarl> Hey Friends. so I am partially responsible for a mongoDB and am about to update a form of Schema so you can look up to see all the different fields and documents (And I guess maybe have some information about fields that might still be present but are deprecated/being phased out f.ex?) any suggestions on best way to make this so its both easy to edit/update, and easy to navigate/take in visually?
[16:35:01] <CustosLimen> how much more space efficent is wiredtiger cache compared to mmap cache ?
[17:38:08] <christo_m> so can anyone here help me query a sub document
[17:38:11] <christo_m> because im not understanding
[17:38:14] <christo_m> same problem for multiple hours i guess
[18:49:58] <christo_m> i mean the query works in mongo console.
[18:50:05] <christo_m> im not sure whats left other than to complain here for hours
[18:55:09] <shlant> hi all. How should I handle permissions for mongo ssl certs? I was putting them in /etc/ssl/private, but mongo doesn't have access. Should I put the combined pem file in /etc/ssl and only give mongo read permissions?
[19:25:29] <christo_m> db.queueitems.find({'user._id': ObjectId('56311a292625f11f80e6cf4b'), 'toWatch': true}) this query seems to work in mongo console
[19:25:40] <christo_m> but when i do a mongoose query it does not
[19:39:06] <StephenLynx> well, what did you expect from mongoose? to work?
[20:07:37] <mylord> 1 per each airline company in the world.. 1000s.. not millions like clients/users
[20:10:20] <galeto> What minimum set of indexes would ensure this query use a good plan ? (mongo 3.0) https://gist.github.com/AlexGalays/e3bd4ee9e1845fdcb062
[20:10:29] <galeto> intersecting indexes don't seem to kick in
[20:10:54] <jrdn_> is this the most optimal way of updating / inserting into an array of embedded documents? https://gist.github.com/j/1f2a4b6942d5abb16971
[20:11:11] <jrdn_> it feels weird doing that, but i don't want to create another collection for the sake of upserting... or should i?
[20:13:29] <galeto> jrdn_ : Maybe you don't need it, but that way of doing upserts is of course not fully safe. findAndModify is your best bet
[20:19:56] <jrdn_> galeto, i like living on the edge though
[20:20:31] <GothAlice> findAndModify isn't safe either, really. (Unless you memorize the documentation page for it and all of its many side-effects, and code really, really carefully.)
[20:21:17] <jrdn_> well now i want to run away, thanks GothAlice
[20:21:38] <GothAlice> jrdn_: Determining if it's optimal or not would require measurement/benchmarking, but the pattern you're using is one I frequently use, too.
[20:22:17] <GothAlice> Ref: the forums I wrote that store replies to threads that way, and these helper methods I wrote to manage the nested data: https://github.com/bravecollective/forums/blob/develop/brave/forums/component/thread/model.py#L99-L161
[20:23:13] <GothAlice> jrdn_: findAndModify is a particularly strange case. Despite needing the basic pattern of "get something, update it" and/or "update something, then get it", I've never once been forced to use findAndModify.
[20:24:39] <jrdn_> yeah, i want to say that I haven't used it either. in my case, it's (and i'm assuming right now since we're not live) not something that will be getting executed a lot.
[20:26:30] <deathanchor> if you need the info. find(), if you need to update it, update(). why would you need both is beyond me.
[20:27:12] <jrdn_> well when using safe updates, doesn't it return whether the document was modified or not, and if it wasn't modified, doesn't it also say that the document was found, but not modified
[20:27:35] <jrdn_> aka in my gist, i use the result.n to check whether or not to push
[20:28:04] <galeto> you use findAndModify with the upsert option
[20:29:15] <GothAlice> On the gripping hand, the vast majority of my upserts are pre-aggregation fire and forget queries.
[20:29:39] <jrdn_> yep, that's where i enjoy mongo.
[20:30:51] <jrdn_> i've never really used a ton of arrays of embedded documents, so i was lost at the minimum and most optimum efforts on adding a document to an array and making sure it's unique
[20:33:46] <deathanchor> it's fine if you have a finite model, but most people just keep piling things into a array or sub doc and then hit the doc size limit.
[20:34:43] <deathanchor> devs always blaming the previous guy for the crappy ever expanding model.
[20:36:08] <jrdn_> yeah, deathanchor we're limiting the array.
[20:36:22] <jrdn_> this is the first time i've ever done it.
[20:36:50] <jrdn_> last time i didn't do it and put it into a different collection (way easier to just move forward, btw), then people start talking about how you're an idiot for not using SQL.
[20:42:03] <jrdn_> ps that mongoengine stuff is hard to look at GothAlice :P
[20:42:35] <GothAlice> jrdn_: Eh, yeah, but only because I'm dropping out of MongoEngine, then shoving the results back in. ;P
[20:42:43] <GothAlice> That was also quite the rush job.
[20:43:12] <GothAlice> https://github.com/marrow/task/blob/develop/marrow/task/queryset.py?ts=4#L28-L81 is a much, much prettier example of ME customization. ;)
[20:43:43] <jrdn_> yeah i had to go to the documentation to see that the operations are followed by the underscore and field
[20:44:07] <GothAlice> Indeed; I didn't duplicate that documentation. It's "Django-style". field[__subfield[…]][__operation]=value
[20:44:30] <GothAlice> It's basically just a pivot to eliminate nesting.
[23:28:35] <tejasmanohar> what can findAndModify() do that update() can't?
[23:28:59] <tejasmanohar> also, anyone familiar w/ https://github.com/Automattic/monk ? and do you know if it exposes document#functions like save() or does it only expose collection#functions like update, find, whatnot