title: Unrecognized pipeline stage name: '$populate'
body: <p>I was using the following code to receive my data set and it worked fine without any error.</p>
  
  <pre><code>const postslist = await postSchemaModel.find()
          .limit(limit)
          .skip(startIndex)
          .sort({ createdAt: -1 })
          .populate(user_id)
          .populate("user_id", "img user_name _id");
  </code></pre>
  
  <p>But , In my case I want to get the result set with <strong><em>$geonear</em></strong> and I used the following code. There it gives me this error <strong>* Unrecognized pipeline stage name: '$populate'*</strong>
  But the populate function was working fine with the above code. Below one is the new code that gives me the error. What can be the fault here ?</p>
  
  <pre><code>postSchemaModel.aggregate([{
          "$geoNear": {
              "near": { "type": "Point", "coordinates": [6.7336665, 79.8994071], "Typology": "post" },
              "distanceField": "dist.calculated",
              "maxDistance": 5000,
              "includeLocs": "dist.location",
              "spherical": true
          }
      },
      { "limit": limit },
      { "skip": startIndex },
      { "$sort": { "createdAt": -1 } },
      { "populate": user_id },
      { "populate": "'user_id', 'img user_name _id'" }
  
  ]).then(async function(posts) {
      //some code here
  });
  </code></pre>