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
sortparameter 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=popularityResult:
Debug Query:
{ "query": { "bool": { "filter": [ { "geo_distance": { "distance": "1km", "distance_type": "plane", "center_point": { "lat": 41.40140682071436, "lon": 2.191686630249024 } } }, { "terms": { "layer": [ "venue", "address", "street" ] } }, { "terms": { "category": [ "nightlife" ] } } ] } }, "size": 20, "track_scores": true, "sort": [ "_score", { "popularity": { "order": "desc" } } ] }I will appreciate your feedback.
Related PR: pelias/query#123
TODO: