PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Saturday the 25th of January, 2020

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[13:20:30] <marcodiego> I live in a location where the decimal separator is ',' instead of '.'. This confuses mongodb when a value is separated by '.' instead of ','. How do I force mongodb to use '.' as decimal separator independently of my location?
[13:20:49] <marcodiego> actually, my OS uses such location
[18:11:33] <nickautomatic> Hi
[18:11:55] <nickautomatic> Anyone here?
[18:13:08] <nickautomatic> is it a good practice to store profile pictures in a mongodb document?
[18:15:48] <nickautomatic> hello...
[18:17:48] <nickautomatic> hello
[19:38:25] <GothAlice> Yuuuup. An abandoned IRC channel totally gives a great impression. :/
[21:25:48] <lakiluki> Hey, assuming I have two collections, "albums" and "users" and each "user" has an array of album he likes. How would I go about making a query to retrieve a boolean value if a particular user "likes" that album, preferrably in an aggregate pipeline?
[21:43:35] <GothAlice> lakiluki: That's a basic query, and involvement of aggregates does nothing to make it easier, or work. !!db.users.find({… some selector looking up the user by ID or name…, "favourites": ObjectId(… ID of an album …)}).count() ← you can even add an index n "favourites" to speed up this lookup. The !! there is JS gibberish to "cast to a boolean" rather than retrieve a 0 or a 1. But that's entirely optional, given the truthiness
[21:43:35] <GothAlice> of 1 over 0.
[21:46:07] <lakiluki> GothAlice: I understand that find is the simplest way to go, but I'm also aggregating the albums with artists beforehand.
[21:47:08] <lakiluki> Since it's kinda hard to explain as I'm totally new to MongoDB and kindof freaking out since I have a project for my uni due tomorrow, here's the stackoverflow link https://stackoverflow.com/questions/59913665/mongodb-match-before-lookup-from
[21:47:27] <lakiluki> I understand that this should be totally basic, but I'm totally unfamilliar with Mongo
[21:56:15] <lakiluki> I guess I could rephrase this question and solve it another way - is there any way to query a collection that has already been queried, in pymongo? For example, when, on aggregate, I get a returned "collection", is there any way to "find" inside that?