At the moment I have a form on the frontend which consists of a query field, categories and location. The location search is using Google Places API to get the lat/lng to send as part of the Algolia search.
One key issue at the moment is when a user searches for results in a country, not all the results show, due the the lat/lng of the country and the radius (fixed to 10 miles) being set may not include all the entries, as some entries will be set for that country, but outside of the radius and the center search point, which it is using for the country.
I have thought about using a distance search field in the front end form, but that does not necessarily solve the issues and count bring up results from other countries if the search radius is larger than the country.
Does anyone have any suggestions for improving this feature functionality so that when a country is selected, with no town or street, then it will return all relevant results.
One option i have thought of is to test the return from Google Place API and see if it only contains a country response, if so, search based on the address country field, rather than the geo data.
I am guessing this may not allow the results to be ordered by location though?
I have also looked through the docs for searching by country and city, from the examples for the airports, it would be good to know if this was worth exploring and testing.
Thanks for any suggestions to improve this location search.