-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: manual
-
Labels:
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 }
- related to
-
DOCS-3465 $near page should note that it can't be used to query sharded collections
- Closed