Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rank by distance #358

Open
cderenburger opened this issue Aug 16, 2015 · 0 comments
Open

Rank by distance #358

cderenburger opened this issue Aug 16, 2015 · 0 comments

Comments

@cderenburger
Copy link

I have a feature request to add the ability to rank results by distance not limited to a radius.

Problem: I have certain zipcodes covering large rural areas. In one case the main city is on the northern border of the zipcode. When performing a search using the zipcode no results are shown as the city is outside of the radius. I can manually specify &radius=50 and it will show results from the city, but also from other cities from a geographically separated area or from cities in another county where the user would not be served.

The other problem with limiting to a particular radius is that some services may serve the state, but be located hundreds of miles away. For example we have a statewide legal hotline with an office in one location, but a radius search would be too limited for appear in the search results for users throughout much of the state.

My services do have service_areas defined by counties. The statewide legal service for instance would list itself as serving all counties. If there were a way to sort results distance (nearest->farthest) that is not limited by distance I would be able to get the desired search results.

I noticed from here b45e1fc that you needed to define an order to get consistent results. Would it be possible to specify a rankby= query parameter that could sort by newest, distance, alphabetical, or other parameters? With other parameters you could for example designate promoted services that would always appear first in the results list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant