Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source/reference/operator/query/maxDistance.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ Example
-------

The following example query returns documents with location values that
are ``10`` or fewer units from the point ``[ 100 , 100 ]``.
are ``10`` or fewer units from the point ``[ -74 , 40 ]``.

.. code-block:: javascript

db.places.find( {
loc: { $near: [ 100 , 100 ], $maxDistance: 10 }
loc: { $near: [ -74 , 40 ], $maxDistance: 10 }
} )

MongoDB orders the results by their distance from ``[ 100 , 100 ]``.
MongoDB orders the results by their distance from ``[ -74 , 40 ]``.
The operation returns the first 100 results, unless you modify the
query with the :method:`cursor.limit()` method.