There is a limitation with the aroundLatLng
query parameter in that results are limited to records within the specified radius of the given central location. This means the results will not include records that lack geo-coordinates (ie. those without a _geoloc
attribute).
To include both geo-located and non geo-located results, one possible workaround to send a multi-query. This involves sending:
- An initial query that filters on a specific geo-radius using
aroundLatLng
- A second query without a geo-location filter, but instead filters on an attribute such as
isGlobal:true
to capture the records that lack geo-coordinates
Please note, this method returns two separate responses, each with it's own array of hits
. You will need to be manually combine the results in your UI, such as displaying them in different sections such as "Around you" and "Worldwide".