-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Nearby API: Add sort parameter #1464
base: master
Are you sure you want to change the base?
Conversation
Hi @bboure, Fortunately, this is open source, where the project maintainers don't have to have strong feelings about every single feature :) So I'm happy to essentially make you the project manager of the nearby endpoint. I do think it makes sense to have a sort parameter that looks at popularity, so feel free to go forward with this feature. We'll merge improvements that you think are useful if they don't break other endpoints 🤣 I've just invited you to the Pelias Contributors team which means you can create branches and open pull requests directly from the Pelias org, to make things easier on you. It also means our CI will generate docker images for any PRs you open. 🚀 |
Thank you for the invite @orangejulius |
2adef13
to
d0b7a3d
Compare
d0b7a3d
to
12886fe
Compare
Hi, Some feedback on this. I have been testing this over the past few months. It hasn't made it to production (We haven't launched the product yet) but seems to be working pretty well, especially if the radius is limited to s small area and the layers are limited to Example of usage: Logs:
Any additional feedback or suggestions are welcome. |
Hi @bboure, did you launch your project now ? I would like to try this feature in a real use case 😄 |
@Joxit Not yet 😞 It's not dead though! Will keep you posted |
Hi,
This is a follow up of pelias/pelias#857.
In order to move step by step, I thought that the first one could be to add a
sort
parameter to the nearby API.Possible values:
distance
(default): records are sorted by distance, from the center point.popularity
: records are sorted by popularity (desc). Popular venues within the area (given the focus point and radius) are placed on top.Motivation:
I want to be able to get popular venues within a given area.
Works well when used with the category filter: e.g: best bars around me.
Example:
/v1/nearby?point.lat=41.40140682071436&point.lon=2.191686630249024&debug=1&categories=nightlife&sort=popularity
Result:
Debug Query:
I will appreciate your feedback.
Related PR: pelias/query#123
TODO: