[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:
Related
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:

  • The collection must have a geospatial index.
  • The $geoNear requires that a collection have at most only one 2d index and/or only one 2dsphere index.

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: DOCS-4120: minor typo

Signed-off-by: Sam Kleinman <samk@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/8bfe7953d33f6fcd542112455a00ef5d9f86ccea

Comment by Githook User [ 20/Oct/14 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-4120: rewording sentence
Branch: master
https://github.com/mongodb/docs/commit/610608a660ac0216487552d361d249289873accb

Comment by Githook User [ 20/Oct/14 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-4120: clarify that field with point in geoNear aggregation is implicit
Branch: master
https://github.com/mongodb/docs/commit/f633ddda8db5f97a230557f9f9cc10b556a3f2f0

Comment by Githook User [ 20/Oct/14 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-4120: remaining files
Branch: master
https://github.com/10gen/mms-docs/commit/b09f64cd15fcfc99cec286567db99644e6504af3

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.

Generated at Thu Feb 08 07:47:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.