Skip to content

Changed example points #2841

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
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.