[DOCS-597] Corrections for geospatial examples in "within" section of "operators" Created: 11/Oct/12 Updated: 10/Jan/13 Resolved: 08/Jan/13 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Rasmus Weber-Esmann | Assignee: | Kay Kim (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Days since reply: | 11 years, 5 weeks, 6 days ago | ||||||||
| 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: } } ); 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() > db.tweets.find( {"geo.coordinates": {$within: {$circle: [[37.75, -122.42],5]} } } ).count() , a shape must be specified.", |
| Comments |
| Comment by Sam Kleinman (Inactive) [ 10/Jan/13 ] |
|
rwe@kamstrup.dk: Agreed. Sorry I didn't make the duplicate link explicit. We're working on resolving this later this week, I just closed this ticket for clarity. Thanks for the attention here! |
| Comment by Rasmus Weber-Esmann [ 10/Jan/13 ] |
|
Only half of the issue has been resolved. There is still the case of the missing "]" (without quotes). db.collection.find( { location: { $within: { $center: [ center, radius }} } ); It should instead be: db.collection.find( { location: { $within: { $center: [ center, radius ] }} } ); Best regards Kamstrup A/S <http://www.kamstrup.com> Kamstrup A/S |
| Comment by Rasmus Weber-Esmann [ 10/Jan/13 ] |
|
Only half of the issue has been resolved. There is still the case of the missing "]" (without quotes). db.collection.find( { location: { $within: { $center: [ center, radius }} } ); It should instead be: db.collection.find( { location: { $within: { $center: [ center, radius ] }} } ); |
| Comment by Kay Kim (Inactive) [ 08/Jan/13 ] |
|
Fixed in |