Add a geoNear example.

This commit is contained in:
behackett 2011-07-22 10:07:54 -07:00
parent d2f03c2502
commit 21ceea4ab9

View File

@ -80,3 +80,11 @@ Or circle (specified by center point and radius):
"{u'loc': [1, 2], u'_id': ObjectId('...')}"
"{u'loc': [2, 5], u'_id': ObjectId('...')}"
"{u'loc': [4, 4], u'_id': ObjectId('...')}"
geoNear queries are also supported using :class:`~bson.son.SON`:
.. doctest::
>>> from bson.son import SON
>>> db.command(SON([('geoNear', 'places'), ('near', [1, 2])]))