Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-15596

[Server] Add documentation for replacing $near $geoNear and $nearSphere with $geoWithin

      $near, $nearSphere, and $geoNear are not allowed in agg pipelines. This can be confusing for users as they can use these operators in non-agg geo queries. We are editing the error message to better explain why these operators are not permitted in an agg context and suggest workarounds (notably, use $geoWithin in agg pipeline if they don't care about sort). You can follow the conversation on SERVER-57932.

      We would like to have documentation describing the workarounds in more detail and link to this documentation in our error message.

            Assignee:
            kenneth.dyer@mongodb.com Kenneth Dyer
            Reporter:
            maddie.zechar@mongodb.com Maddie Zechar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              1 year, 14 weeks ago