Skip to content

Commit

Permalink
updated docs for geoNear
Browse files Browse the repository at this point in the history
  • Loading branch information
mpangrazzi committed May 5, 2019
1 parent 7481e47 commit f592df4
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions docs/collection/geoNear.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
# `collection.geoNear`

[Mongo documentation <i class="fa fa-external-link" style="position: relative; top: 2px;" />](http://mongodb.github.io/node-mongodb-native/2.0/api/Collection.html#geoNear)
[Mongo documentation <i class="fa fa-external-link" style="position: relative; top: 2px;" />](https://docs.mongodb.com/manual/reference/command/geoNear)

Execute the geoNear command to search for items in the collection.

#### Arguments

1. `x` *(number)* - Point to search on the x axis, ensure the indexes are ordered in the same order.

1. `y` *(number)* - Point to search on the y axis, ensure the indexes are ordered in the same order.

1. [`options`] *(Object)*

1. [`callback`] *(function)*

#### Returns

A promise.

#### Example

```js
users.geoNear(50, 50, {query:{a:1}, num:1}).then((results) => {})
```
Node.js MongDB native driver 3.x [removes the support of this command](https://github.com/mongodb/node-mongodb-native/blob/master/CHANGES_3.0.0.md), since there are already alternatives like `$near` and `$nearSphere` query operators (see the documentation link above for more info).

0 comments on commit f592df4

Please sign in to comment.