title: Search multiple collections in mongodb
body: <p>I have two collections, Movies and Shows.</p>
  
  <pre><code>const ShowsSchema = new Schema({
  title: {
   type: String,
   required: true
         },
  description: {
   type: String,
   required: true
  },
  image: {
   type: String,
   required: true
  })
  </code></pre>
  
  <p>Currently I'm only able to search data from one collection but I want to fetch data from both. After looking through some solutions on the website I came across the $lookup field.</p>
  
  <pre><code> router.get('/:query', (req, res, next) =&gt; {
    const query = req.params.query;
    Show.aggregate([{
  
     $lookup: {
      from: "Movies",
      localField: "title",
      foreignField: "title",
      as: "movies"
       }
    }], () =&gt; {
  
    Show.find({
    title: {
      $regex: new RegExp(query),
      $options: "$i"
    },
  
  }, (err, shows) =&gt; {
    if (err) {
      console.error(err);
    }
    res.json(shows);
    });
   });
  });
  </code></pre>
  
  <p>I'm stuck here any help would be greatly appreciated.</p>