[DOCS-4120] For $geoNear, clarify that the "location" field is implicit Created: 01/Oct/14 Updated: 16/Mar/15 Resolved: 20/Oct/14 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | v1.3.13 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kevin Pulo | Assignee: | Sam Kleinman (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Participants: | |||||
| Days since reply: | 9 years, 16 weeks, 4 days ago | ||||
| Description |
|
In the docs for the $geoNear aggregation operator http://docs.mongodb.org/manual/reference/operator/aggregation/geoNear/ it's stated:
However, it would be useful to then explicitly state that the location field does not need to be specified to the operator, since the 2d/2dsphere field from the geospatial index is what will (implicitly) be used. |
| Comments |
| Comment by Githook User [ 25/Oct/14 ] |
|
Author: {u'username': u'devkev', u'name': u'Kevin Pulo', u'email': u'kev@pulo.com.au'}Message: Signed-off-by: Sam Kleinman <samk@10gen.com> |
| Comment by Githook User [ 20/Oct/14 ] |
|
Author: {u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}Message: |
| Comment by Githook User [ 20/Oct/14 ] |
|
Author: {u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}Message: |
| Comment by Githook User [ 20/Oct/14 ] |
|
Author: {u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}Message: |
| Comment by Kevin Pulo [ 07/Oct/14 ] |
|
This is not about the near parameter to $geoNear. This is about "How do I tell $geoNear where to look in my documents for the coordinates? How do I specify which field in my documents has the coordinates to search?" The answer is that you don't need to specify this to $geoNear, because it figures it out itself based on the field used by the (single) 2d/2dsphere index which must be present. |
| Comment by Sam Kleinman (Inactive) [ 03/Oct/14 ] |
|
You must specify a near argument to the $geoNear pipeline stage. If you do not, or the argument is malformed the pipeline will fail to execute. If you observe a counter case, you should file that as a SERVER case. |