PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Saturday the 2nd of May, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:37:55] <Omego2K> would help with an alternative cheeser, it's the only thing stopping a migration from XML :\
[02:16:44] <Aderium> so I am a newbie at this but I cant tell you that MongoDB has been incredibly great.
[02:17:40] <cheeser> :D
[02:18:00] <Aderium> I need to be able to query mongodb : show me all the records with field called name that greater then one _id
[02:19:23] <Aderium> I need to be able to query mongodb : show me all the records ( _id) with field called name that are have more then one _id, example I have 2 _id with field name myname
[02:20:59] <cheeser> sounds like a job for the aggregation pipeline.
[02:21:09] <cheeser> group by name, count, filter for count > 1
[08:11:22] <dunkel2> hello
[10:37:09] <M-ou-se> would an arbiter be able to access the data? (since it has the keyfile? or do you need more than this keyfile to access any data?)
[10:55:53] <ChALkeR> Hi all. Any ETA for mongodb repo for debian stable?
[10:58:09] <ChALkeR> http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian/
[10:58:14] <ChALkeR> This is wrong.
[10:58:21] <ChALkeR> > Use this tutorial to install MongoDB from .deb packages on the current stable Debian release.
[10:58:25] <ChALkeR> Doesn't work.
[11:09:51] <dimon222_> you mean doesn't work on jessie?
[11:10:12] <dimon222_> what does it say at least?
[11:13:04] <ChALkeR> W: Failed to fetch http://repo.mongodb.org/apt/debian/dists/jessie/mongodb-org/3.0/main/binary-amd64/Packages 404 Not Found
[11:13:32] <ChALkeR> http://repo.mongodb.org/apt/debian/dists/ — has no jessie folder.
[11:13:42] <ChALkeR> dimon222_: Yes, jessie is the current stable.
[11:14:16] <ChALkeR> There is just no jessie repo.
[11:14:51] <ChALkeR> That's what I already said above.
[12:13:33] <Gevox> Hi, i have a method which updates a certian document in my DB. However, the method prints out "success" if it has succeed to find a match a record for the desired one and have succesfully updated it. So it prints that it actually went all good. But the fact that the record is never updated in my db.
[12:13:47] <Gevox> The same exact method is being called on another machine i have, and it updates into the DB.
[12:14:13] <Gevox> so when i write in the mongo shell db.Collection.find() i can see the updated document on the other machine, but on mine, it does not change anything
[12:14:30] <Gevox> What could it be?
[12:53:04] <dimon222_> o_o
[12:54:03] <dimon222_> for another machine you mean that you have two different mongodb instances?
[12:55:02] <dimon222_> its hard to say anything without seeing code tho, but if record was successfully then .update willreturn amount of modified records i think
[12:55:21] <dimon222_> in json
[13:27:01] <ChALkeR> Ok, packages for debian oldstable seem to work on debian stable.
[13:51:12] <Vitium> I have a document and I want to add a subdocument to it, can I do that with an update?
[16:48:26] <Vitium> GothAlice, Hi.
[17:26:39] <StephenLynx> https://mongodb.github.io/node-mongodb-native/api-generated/collection.html#findandmodify ok, the "new" option can only be used if you put it as a string? is it my lint?
[17:26:46] <StephenLynx> the example uses just {new:true}
[18:31:15] <volk_> hey fellas i would absolutely love some help with this: http://stackoverflow.com/questions/29881320/mongo-multikey-index-for-friends-of-friends
[18:37:45] <GothAlice> volk_: Just from the question in the URL, my initial gut feeling is that if you want to model a graph, use a graph database…
[18:38:23] <GothAlice> Choices to "wing it" with other databases have killed projects.
[18:38:53] <volk_> would love to, except this is an app that hasnt been released yet and introducing and overengineering at the moment is needless. i know you can achieve this with mongo, im just confused as to how multi key indexes work
[18:39:39] <GothAlice> Question, though, are your relationships bidirectional, or unidirectional? (I.e. user A friends user B, user B doesn't need to mutually friend back to form the relationship)
[18:40:20] <GothAlice> (Does A friending B imply B is a friend of A?)
[18:41:22] <GothAlice> volk_: The answer to that question determines the approahc.
[18:41:25] <GothAlice> Approach, even.
[18:41:41] <volk_> its bidirectional
[18:42:00] <volk_> im building a “discovery” feed, so if youre mutual friends with someone then their friends become importnat
[18:42:16] <volk_> if youre just following a celebrity for example
[18:42:32] <volk_> and theyre not following you, then the people they follow arent important to you
[18:42:42] <volk_> at least for the MVP version
[18:42:48] <GothAlice> Tiny bit more complicated, but doable. Have a collection containing only the relationships. Each record would contain: {_id: ObjectId(…), rel: [ObjectId("user A"), ObjectId("user B")]} — optionally, instead of just an ObjectId, you could cache values you almost always need, such as the name:
[18:42:48] <volk_> i think the mutual way to go is easier for the time being
[18:43:13] <GothAlice> {_id: ObjectId(…), rel: [{id: ObjectId("user A"), name: "Bob Dole"}, {id: ObjectId("user B"), name: "Al Gore"}]}
[18:43:25] <GothAlice> It turns it from two fields, to one list field.
[18:43:32] <volk_> .
[18:43:38] <volk_> whoa my irc client got buggy
[18:43:43] <volk_> messages are out of order
[18:43:43] <GothAlice> How so?
[18:43:50] <volk_> what the heck
[18:43:54] <GothAlice> http://s.webcore.io/image/1t3U0e3n2m3G
[18:43:57] <GothAlice> Have a screenshot. :)
[18:44:05] <volk_> okay i think its back to normal
[18:44:06] <volk_> youre fast
[18:44:14] <volk_> nope still out of order, let me reconnect one second
[18:44:47] <volk_> okay i hope you didnt miss me too much GothAlice
[18:44:48] <volk_> :)
[18:44:54] <volk_> let me just re-read what you wrot
[18:45:48] <volk_> right so GothAlice , at the moment i already have users, and a collection that has relationships for “friendships” , youre technically allowed to follow a person without them following you.
[18:46:00] <GothAlice> Right, then it's unidirectional.
[18:46:09] <volk_> yeah that part is however the thing im building
[18:46:12] <GothAlice> Even easier. :)
[18:46:23] <volk_> the discovery piece, which depends on friends of friends
[18:46:29] <volk_> and a friend is someone
[18:46:32] <volk_> who is following you back
[18:46:38] <volk_> which you can check very easily
[18:46:44] <GothAlice> {_id: {friendee: {id: ObjectId("user A"), name: "Bob Dole"}, friend: {id: ObjectId("user B"), name: "Al Gore"}}
[18:46:47] <GothAlice> :3
[18:47:13] <volk_> i guess my main question is just simply whether mongo indexes whole embedded documents
[18:47:17] <volk_> within an array
[18:47:28] <GothAlice> I believe it hashes the embedded documents.
[18:47:50] <GothAlice> I.e. you can use the index to ask if a whole object (including the order of all fields!) exists within the array.
[18:48:01] <volk_> for example if i embed many of something, like users within a user. (his friends) , and i want to index the embedded documents, do i simply index on their ID, like….”friends.id”
[18:48:06] <volk_> or can i just index “friends"
[18:48:43] <GothAlice> Indexing on friends would do the hashing thing. You want an index on friends.id.
[18:48:58] <GothAlice> That would iterate however many embedded documents there are and build up multiple pointers to the overall document in the index.
[18:49:41] <GothAlice> (Indexes always point at the outermost document AFIK.)
[18:50:05] <GothAlice> To get back only that one value in the array you'd need to use $elemMatch and $ in the query projection.
[18:50:51] <volk_> awesome, so basically at that point if i do something like… user.friends.find(someID) .. that would be constant time find right
[18:51:55] <GothAlice> Btree searches are log(n) for most operations, including search.
[18:52:02] <GothAlice> Not constant time.
[18:57:36] <volk_> ah okay. thanks GothAlice
[18:57:37] <volk_> :0
[18:57:38] <volk_> :)
[18:58:09] <GothAlice> Heh, no worries.
[18:58:32] <GothAlice> Btrees are actually the big reason why .skip() is so inefficient.
[18:59:45] <GothAlice> (It has to visit every leaf to count the references before finally returning values.)
[23:01:38] <d4rklit3> hi
[23:03:15] <d4rklit3> so in mongo 2.6 i db.copyDatabase() a db and created a new user for it. for some reason my js driver (mongoose) throws an auth error
[23:03:30] <d4rklit3> but i can connect with robomongo
[23:08:01] <d4rklit3> do i need to provide the admin u/p if auth is enabled even if it is same host?
[23:42:58] <d4rklit3> :(