title: $geoNear, $near, and $nearSphere are not allowed in this context
body: <p>I'm writing an aggregation query that try to match users in a certain area. I followed the <a href="https://docs.mongodb.com/v3.6/reference/operator/aggregation/geoNear/" rel="nofollow noreferrer">3.6</a> version documentation (my version of <code>mongodb</code>)</p>
  <pre><code>db.collection('users').aggregate([
        {$match: {
          location: {
            $geoNear: {
              near: {type: 'Point', coordinates: [lng, lat]},
              maxDistance: globalConf.maxDistance * 1000
            }
          }
        }})
  </code></pre>
  <p>if I use this match in a <code>find</code> context it works . How to modify the query to make it works in an aggregate context?</p>
  <p>The error I get is <code>$geoNear, $near, and $nearSphere are not allowed in this context</code></p>