collection.geoHaystackSearch
Execute a geo search using a geo haystack index on a collection.
Arguments
x
(number) - Point to search on the x axis, ensure the indexes are ordered in the same order.y
(number) - Point to search on the y axis, ensure the indexes are ordered in the same order.options
(Object) - Need to specify at least themaxDistance
andsearch
options.[
callback
] (function)
Returns
A promise.
Example
users.geoHaystackSearch(50, 50, {search:{a:1}, limit:1, maxDistance:100}).then((results) => {})