Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
Description
both $near and $nearSphere have the same behaviour for sharded collections:
For sharded collections, queries using $near are not supported. You can instead use either the geoNear command or the $geoNear aggregation stage.
|
However, this is not denoted in the documentation for $nearSphere (only $near, as above).
Running $nearSphere on a sharded collection will result in:
error: { "$err" : "use geoNear command rather than $near query", "code" : 13501 }
|
Attachments
Issue Links
- related to
-
DOCS-3465 $near page should note that it can't be used to query sharded collections
-
- Closed
-