I'm wondering how these aggregations queries may increase the billing, or spend quota limitations, due to of the number of documents scanning, reading and processing before returning the results...
Great video tnx. I ask, if genres where on another collections and i used lookup to retrive them into movies aggregation, how it would be possilbe to get movies documents filtered by a specific genre name, if genres arrives from another collection? Tnx
I don't for what it will be useful in the future but for practice and for interest i did research to find how to do that, and found this way for that. First of all request the collection where genres stored. // example aggregate const genres = Genres.aggregate([. // without await !! { $match: {genre: req.params.genre}} ]) then get that variable from query // index inside of at() func shows stages of aggregate let genreForMovies = genres.pipeline().at(0).$match; it will return object like { genre: "Drama" } with this object get the value of variable and make another aggregate for movies collection good luck
The depth of your playlist is very deep than the ocean . I don't know these topics exist too
thank you
I'm wondering how these aggregations queries may increase the billing, or spend quota limitations, due to of the number of documents scanning, reading and processing before returning the results...
❤❤❤
Great video tnx.
I ask, if genres where on another collections and i used lookup to retrive them into movies aggregation, how it would be possilbe to get movies documents filtered by a specific genre name, if genres arrives from another collection?
Tnx
I don't for what it will be useful in the future but for practice and for interest i did research to find how to do that, and found this way for that.
First of all request the collection where genres stored.
// example aggregate
const genres = Genres.aggregate([. // without await !!
{ $match: {genre: req.params.genre}}
])
then get that variable from query
// index inside of at() func shows stages of aggregate
let genreForMovies = genres.pipeline().at(0).$match;
it will return object like { genre: "Drama" }
with this object get the value of variable and make another aggregate for movies collection
good luck
which VS Code theme are you using sir?
Bro like Sci-Fi Movies
did you share the code sir ?
{29-9-2024}
{2023-08-29}