PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 25th of May, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:03:54] <kexmex> hey guys
[00:04:02] <kexmex> i moved mongod's data directory
[00:04:06] <kexmex> and changed mongod.conf
[00:04:22] <kexmex> it doesn't start up as a service but starts manually when i run mongod -f /etc/mongod.conf
[00:06:07] <StephenLynx> kexmex http://docs.mongodb.org/manual/reference/operator/
[00:06:30] <kexmex> ???
[00:06:40] <StephenLynx> "where can I find the rules about what combinations of things you can put into a single update query?"
[01:08:01] <findme> hello need mongo documents.
[07:48:57] <Constg> Hello, do you know how to upgrade mongodump to v 3? My database is 3, my schema version is 5 (WiredTiger), but then, mongodump doesn't work anymore.
[08:10:04] <joannac> Constg: erm, how did you upgrade the other binaries?
[08:10:48] <Constg> joannac, apt-get upgrade, but the shell stays on 2.6.10
[08:27:36] <joannac> Constg: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/ ?
[08:32:11] <Constg> ha...dumb e! I frogot to change the debian package list to 3....
[08:32:17] <Constg> Thank you very much joannac
[08:32:36] <joannac> np
[10:04:44] <hello_kitty> whats a logical way to establish roles for a document (ie canEdit: Sarah, Jeremy, canView: Anyone | or just certain users) such that one can easily run a query from the perspective of the user to get all documents that they have some form of permission on
[10:06:10] <hello_kitty> I'm not thinking of db roles, just a custom concept of roles attached to some data
[11:57:44] <pamp> Hi
[11:58:00] <pamp> is there any irc channel only for mongodb C# driver?
[12:32:00] <Folkol> I am sure that your questions will be on topic for this channel, pamp.
[12:39:14] <xaxxon> how would you do multiple $addToSet calls atomically?
[12:40:23] <xaxxon> like.. I have one document with multiple subarrays i wnat to add things to
[12:41:09] <StephenLynx> {query block},{$addToSet:{arrayA:object,arrayB: other object}}
[12:41:24] <StephenLynx> if I am not mistaken.
[12:41:37] <xaxxon> oh I guess that maeks sense. trying
[12:42:31] <xaxxon> yeah, that does iti. mongo syntax is still very foreign to me
[12:43:46] <StephenLynx> once you get used to it, you won't want to switch back to sql.
[12:44:26] <StephenLynx> especially when using the node.js driver.
[12:45:39] <xaxxon> I dunno. I still like joins
[12:50:01] <StephenLynx> with documents you have sub-documents.
[12:50:22] <StephenLynx> I am not saying you can replace relational dbs completely.
[12:50:51] <StephenLynx> but the workflow of mongo is much more pleasant. the queries are actually code in your language.
[12:56:07] <xaxxon> so how do you both set a specific field to a value and call $addToSet atomically?
[12:56:54] <StephenLynx> hm?
[12:57:01] <StephenLynx> didn't that worked?
[12:57:13] <xaxxon> differnet question, right?
[12:57:19] <StephenLynx> ah
[12:57:44] <StephenLynx> {$set:{field:value,anotherFIeld:another value},$addToSet:{yadda yadda}}
[12:57:46] <StephenLynx> that?
[12:57:48] <xaxxon> like.. meteor:PRIMARY> db.rooms.update({_id: "bufqZJMJchZu592mm"}, {$addToSet:{foo:2, bar: 31}, joe: 5} )
[12:57:57] <StephenLynx> meteor?
[12:57:58] <xaxxon> oh
[12:58:00] <xaxxon> $set
[12:58:04] <xaxxon> yes
[12:58:24] <xaxxon> meteor the web framework
[12:58:36] <xaxxon> https://www.meteor.com/
[12:58:46] <StephenLynx> never heard about.
[12:58:54] <xaxxon> watch the movie. it's pretty sweeet
[12:58:59] <StephenLynx> what movie?
[12:59:03] <xaxxon> uhh
[12:59:13] <StephenLynx> web frameworks are crap, I got stuff to do.
[13:00:37] <StephenLynx> "Meteor is a complete open source platform for building web and mobile apps in pure JavaScript." but you can do that when using io or node.
[13:01:01] <StephenLynx> wait, is this client-side?
[13:01:05] <xaxxon> it's both
[13:01:11] <StephenLynx> asdhasjf
[13:01:12] <StephenLynx> :^)
[13:01:17] <StephenLynx> lol
[13:01:27] <StephenLynx> you shouldn't connect to a database on client-side.
[13:01:42] <xaxxon> you don't.. sort of
[13:01:46] <xaxxon> but it looks like you do
[13:02:08] <StephenLynx> it sounds like a steaming pile, if you ask me.
[13:02:23] <_ari> i have a string element in mongodb that's like this ==> date: "15-05-01 1:00"
[13:02:25] <xaxxon> it lets you do certain types of advanced things VERY quickly
[13:02:36] <_ari> but when i try to query it, it won't output anything
[13:02:36] <xaxxon> and reactive programming is very cool
[13:02:47] <StephenLynx> reactive programming is a meaningless buzzword.
[13:02:51] <xaxxon> you write it the way you want it to look and it takes care of updating it as the data changes
[13:03:05] <xaxxon> no it's not. It's a very specific style of programming that takes care of a lot of stuff for you
[13:03:09] <StephenLynx> that is coupling and is the bane of software development.
[13:03:21] <StephenLynx> that is bloat.
[13:03:33] <xaxxon> javascript is bloat. do it in C then
[13:03:36] <xaxxon> and write your own database
[13:03:43] <xaxxon> I mean.. it's all about tradeoffs
[13:04:00] <xaxxon> meteor provides a very compelling featuer set for very little code
[13:04:02] <StephenLynx> of all scripting languages, js is the leanest of them that is widely used.
[13:04:08] <StephenLynx> meteor is crap.
[13:04:15] <xaxxon> ok
[13:04:35] <xaxxon> regardless, it's fun
[13:04:37] <StephenLynx> they gloat about less than 6k packages, npm has over 151k
[13:04:42] <StephenLynx> fun is not productive.
[13:04:43] <xaxxon> and enjoyable to develop in
[13:05:28] <StephenLynx> it doesn't matter how enjoyable it is when you develop bad software.
[13:05:36] <StephenLynx> its useless.
[13:05:52] <xaxxon> you sure have it figured out for not having heard of it 5 minutes ago
[13:06:43] <StephenLynx> I am familiar with web frameworks, they existed since forever and I am familiar with the fundamentals of software design.
[13:07:01] <StephenLynx> when I see a do-all tool like this is not hard to figure it is bad.
[13:07:24] <StephenLynx> especially when someone defends it by meaningless subjective aspects.
[13:07:52] <xaxxon> frameworks are about tradeoffs. Anyoneo who thinks there's one right way to do everything is wrong. There are a lot of people who think meteor provides a solution to an interesting set of problems
[13:08:22] <StephenLynx> like.
[13:08:34] <StephenLynx> >Anyoneo who thinks there's one right way to do everything is wrong.
[13:08:41] <StephenLynx> that is EXACTLY what frameworks do.
[13:08:50] <StephenLynx> they force you to use one way to do everything.
[13:08:52] <xaxxon> you don't have to use a single framework to solve every problem
[13:09:13] <xaxxon> just like I don't have to use the same programming language for every project
[13:09:26] <StephenLynx> that is why I don't use frameworks.
[13:09:39] <StephenLynx> except when they are developed around a toolset, like UDK or android.
[13:10:13] <StephenLynx> web frameworks are developed around (bad designed) crutches of existing tool sets meant to be used out of the box.
[13:10:33] <StephenLynx> they give you zero functionalities while adding bugs, vulnerabilities and eating up performance.
[13:11:04] <xaxxon> glad you've got everything figured out. anyhow, thanks for your help with mongo
[13:11:11] <xaxxon> it's actually making quite a bit more sense already
[14:01:13] <loadh> StephenLynx: hello
[14:01:21] <loadh> I changed to use the native Node driver
[14:01:32] <loadh> however, i'm now having some issues
[14:01:41] <loadh> my geo functions are a bit different
[14:01:57] <loadh> what i need to do is a geo search to find all businesses near the user's location
[14:02:12] <loadh> so i'm using collection.geoNear with shpherical true?
[14:03:11] <loadh> the problem i'm having is that i would like only some fields to be returned, so I gather the way this should be done is with 'aggregate', specifying the fields in ' $project;{field...}' etc
[14:03:42] <loadh> but how I tie this to the geo near function I don't know...because i'm getting all results in my DB back..
[14:33:40] <StephenLynx> loadh I never used geo functions, but the driver's documentation is really good http://mongodb.github.io/node-mongodb-native/2.0/
[14:34:09] <loadh> StephenLynx: yeah I'm trying to follow it
[14:35:16] <_ari> anyone
[14:36:23] <_ari> anyone know how i can use this query for mongodb: http://stackoverflow.com/questions/30440363/sum-up-tuples-that-contain-a-specified-id
[14:50:58] <_ari> blah
[15:15:35] <cheeser> _ari: still trying?
[15:22:57] <JoshK20> Hey. I have a document that looks like this: http://hastebin.com/agojuwigap.coffee. With the PHP driver, how would I remove the hub_fly (under packages) from it? Thanks.
[16:19:34] <_ari> cheeser: yeah ;<
[16:19:37] <_ari> still trying
[16:22:20] <StephenLynx> ".write(string, encoding, offset, length) is deprecated. Use write(string[, offset[, length]][, encoding]) instead." I write two files from disk to gridfs. One is an image, and the other is an image generated using imagemagick. Only the thumbnail gives me this warning.
[16:22:50] <StephenLynx> I have just updated all modules of my project, so the driver is not outdated and I am using the latest mongo version from 10gen's repository.
[16:25:14] <StephenLynx> GothAlice you seem to be the most familiar with gridfs here, any idea on this?
[17:00:24] <_ari> cheeser: im dying
[17:00:25] <_ari> :D
[17:29:34] <_ari> can we nest a find() in an aggregate() in mongodb?
[17:30:37] <StephenLynx> no
[17:31:08] <_ari> hehe
[17:40:39] <cheeser> use $match
[18:02:47] <_ari> cheeser, but how can $match match things in other json elements
[18:03:37] <_ari> i mean something like this for example: http://paste.ubuntu.com/11354449/
[18:04:18] <_ari> i want to match the volumeId of one entry to the resourceid of the other entry and sum the costs if matched
[18:12:21] <StephenLynx> a join?
[18:12:48] <StephenLynx> aaaah
[18:12:50] <StephenLynx> hold on
[18:12:57] <StephenLynx> you have two documents on a collectiona
[18:13:22] <StephenLynx> and if they match a same value on a field you wish to sum another field of their?
[18:13:27] <StephenLynx> use $group _ari
[18:13:38] <StephenLynx> and use _id as the value you wish to match.
[18:14:05] <StephenLynx> and then $sum to get the sum of costs
[18:24:20] <_ari> StephenLynx: I'm sure how to match two seperate documents
[18:24:31] <_ari> i can match entries within one document
[18:24:39] <_ari> i'm not sure*
[18:24:49] <StephenLynx> you don't.
[18:24:51] <StephenLynx> afaik
[18:25:00] <StephenLynx> I might be wrong, but I am pretty sure you don't.
[18:25:15] <StephenLynx> so far the only operation I saw relating two documents is $group.
[18:25:27] <_ari> So is it possible to perform this query?
[18:25:59] <StephenLynx> get the sum of all costs grouped by a resourceId?
[18:27:33] <_ari> but i also need the sume of costs of volumeId that match resourceId
[18:27:45] <_ari> that is where my issue lies
[18:27:51] <StephenLynx> so sum them too.
[18:29:38] <_ari> mm
[18:30:25] <_ari> resouceId: {$eq: "$volumeId"}
[18:30:34] <_ari> hmm
[18:30:35] <_ari> no
[18:30:40] <StephenLynx> $group{_id:'$resourceId'}
[18:30:47] <_ari> that would check the same document
[18:30:53] <StephenLynx> trust me.
[18:31:01] <StephenLynx> that is how $group works.
[18:32:17] <_ari> that doesn't group volumeId with resouceId
[18:32:27] <_ari> just resourceId with the same resourceId
[18:32:34] <_ari> lol
[18:32:40] <_ari> i'm confusing myself now
[18:32:46] <StephenLynx> well, yeah, you can group only using one parameter, afaik.
[18:33:50] <_ari> hmm
[19:13:28] <Waitak> I'm having a bit of trouble understanding how to poke around in the results of find_one() using the new C++11 API. Is this an appropriate place to ask?
[22:43:46] <Waitak> Is there a place to submit tickets for the 3.0.X C++ API?
[22:45:31] <cheeser> Waitak: https://jira.mongodb.org/browse/CXX
[22:46:24] <Waitak> Tnx.
[23:15:33] <jak12345678> Is it possible to have a covered query which uses '$in'? It always seems to actually fetch the documents