Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Good idea, I'll add LIMIT. Makes sense to say I want N nearest elements with max distance of Y.


Great Salvatore! Could you make the max distance parameter optional? Sometimes i just want the nearest items, even though they could be on the other side of the world.


I feel like that is a fairly unusual usecase; plus you could just set the max distance parameter to the diameter of the Earth.


One of our applications has user generated content with a geolocation attached to each of the items. For several selections we want to show the top 10 nearest items. If they are only a few, the radius has to be very large to have some items in the result set.

Currently the Geo module only supports a range up to 20.000 km. So your idea does not work at the moment. I agree that those items are not really "nearby", but to be consistent through out the application it would be nice to be able to select without a max distance.


I think the redis convention would be required and -1 gives you everything.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: