[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
[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?
[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: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
[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: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: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: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: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.
[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?