#83 Aggregation pipeline: $unwind & $project |Using MongoDB with Express | A Complete NODE JS Course

Поділитися
Вставка
  • Опубліковано 16 гру 2024

КОМЕНТАРІ • 11

  • @b.s.n.murthy8798
    @b.s.n.murthy8798 2 місяці тому

    The depth of your playlist is very deep than the ocean . I don't know these topics exist too

  • @hassannouri9796
    @hassannouri9796 3 місяці тому

    ❤❤❤

  • @canmertinyo
    @canmertinyo Місяць тому

    thank you

  • @giorgiobrugnone6879
    @giorgiobrugnone6879 Рік тому +1

    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

    • @acupoflie
      @acupoflie 11 місяців тому

      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

  • @harshmehta1141
    @harshmehta1141 Рік тому +3

    Bro like Sci-Fi Movies

  • @diogogaio
    @diogogaio 5 місяців тому

    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...

  • @DecoyCheats
    @DecoyCheats Рік тому

    which VS Code theme are you using sir?

  • @BilelBennour-w2s
    @BilelBennour-w2s Рік тому

    did you share the code sir ?

  • @Pareshbpatel
    @Pareshbpatel Рік тому

    {2023-08-29}

  • @mohamedibrahemsaad573
    @mohamedibrahemsaad573 2 місяці тому

    {29-9-2024}