Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
None
-
None
Description
At http://docs.mongodb.org/manual/reference/operators/#_S_within code is given to find geospatial data within a circle. The following code is given:
db.collection.find( { location: { $within:
} } );
A "]" (without quotes) is missing. Also should $circle be changed to $center?
Using the dataset provided for Chris Harris training session at Kamstrup in Denmark this week i get the following results:
> db.tweets.find( {"geo.coordinates": {$within: {$center: [[37.75, -122.42],5]} } } ).count()
13
> db.tweets.find( {"geo.coordinates": {$within: {$circle: [[37.75, -122.42],5]} } } ).count()
Mon Oct 08 14:40:53 uncaught exception: count failed: {
"errmsg" : "exception: unknown $within information :
, a shape must be specified.",
"code" : 13058,
"ok" : 0
Attachments
Issue Links
- is duplicated by
-
DOCS-934 Multiple $centerSphere examples are wrong and related issues with $within and $centerSphere
-
- Closed
-