Skip to content

Latest commit

 

History

History
25 lines (14 loc) · 771 Bytes

geoHaystackSearch.md

File metadata and controls

25 lines (14 loc) · 771 Bytes

collection.geoHaystackSearch

Mongo documentation

Execute a geo search using a geo haystack index on a collection.

Arguments

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

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

  3. options (Object) - Need to specify at least the maxDistance and search options.

  4. [callback] (function)

Returns

A promise.

Example

users.geoHaystackSearch(50, 50, {search:{a:1}, limit:1, maxDistance:100}).then((results) => {})