openstreetmap / iD

🆔 The easy-to-use OpenStreetMap editor in JavaScript.
https://www.openstreetmap.org/edit?editor=id
ISC License
3.34k stars 1.2k forks source link

spa for shop=beauty match is really late despite being an exact one #9560

Open matkoniecz opened 1 year ago

matkoniecz commented 1 year ago

And "wellness spa" matches nothing

https://github.com/openstreetmap/id-tagging-schema/blob/main/data/presets/shop/beauty.json#L12

screen

see also https://community.openstreetmap.org/t/how-you-tag-spa-wellness-spa/97239

tyrasd commented 1 year ago

this is actually "a feature": partial matches on preset's name or aliases are sorted before exact or partial matches in search terms. This is because search terms are handled much more liberally and often include short phrases which would collide with the name of other presets.

I agree that the current sorting is not quite good, especially seeing the relatively large amount of partial matches of brand names. :unamused:

Perhaps it could make sense to rank partial brand name matches lower than exact matches in search terms? :thinking:

matkoniecz commented 1 year ago

It seems that problem is in general complex and fixing this case may break another. Are there test cases for search result ranking? That would prevent fixing one issue and breaking another and going in a cycle.

matkoniecz commented 1 year ago

Perhaps it could make sense to rank partial brand name matches lower than exact matches in search terms? thinking

Sounds good to me

And also spaceport should rank lower