title: Mongoose sample operator not working
body: <p>Whenever I remove the line with sample with only match remaining, the code works fine, but when I add it back like this: </p>
  
  <pre><code>Model.aggregate(
      {$match: {}},
      {$sample: {size: 2}},
      (err, rsp)=&gt;{
     callback(err,rsp);
  });
  </code></pre>
  
  <p>It throws an error saying the first argument must be a string or buffer. It can only be caused by {$sample: {size: 2}}. Why is it?
  Is sample not working in mongoose??</p>