orblivion / desert-atlas

Other
7 stars 1 forks source link

Search relevance and duplication #9

Closed orblivion closed 1 year ago

orblivion commented 1 year ago

These two are somewhat related, because ranking by location could disambiguate two things that have the same name.

This unfortunately might be sophisticated, but I fear that the app would be pretty shoddy if people look for a Starbucks and it sends them across the state. Thus I label it as a launch feature. I hope I can make a hack solution. Open to ideas to minimize work here for launch.

orblivion commented 1 year ago

This ended up being quite easy. I just order by distance-squared (faster, don't need the square root) right in sqlite. As for the Starbucks problem, I just pick the first one since it's the closest. Interestingly, the frontend was already deduping it, but picking something other than the first one. I just deduped it on the backend the way I wanted.

https://github.com/orblivion/sandstorm-share-a-map/commit/2c52c76b037583511b0f60c8d13992231faf0e5a https://github.com/orblivion/sandstorm-share-a-map/commit/45ce7f8d0f50e32afe43943c30683f96731d4207

In the long run we want to disambiguate duplicates by address in the UI, but for launch I think we can get away with this as is.

orblivion commented 1 year ago

FYI @ocdtrekkie. You mentioned the "Starbucks" problem in the mailing list.