Hi,
Why an exact name match is not put on the first place of the result list? asked 18 Apr '19, 10:47 Mocsi |
One Answer:
The city Zemplénagárd (https://www.openstreetmap.org/node/354944716) has a Slovak name of answered 18 Apr '19, 10:56 mtmail showing 5 of 12 show 7 more comments |
Definitely error. Both are Hungarian cities.
Which still doesn't mean that this is a tagging error.
name:sk
specifies the Slovak name, not the Hungary name. I can't find a source for the Slovak name, though.name:sk
has been added in changeset 42663428 which also has a discussion about the source. It says "main source is the Ethnographic Map of Hungarian Slovaks" according to a famous online translator.Slovak Wikipedia tells us that the Slovakian names for Zemplénagárd and Ősagárd are indeed Agard and Agárd, respectively.
To influence the ranking you could add name:hu tags and add
&accept-language=hu,en
to the Nominatim query URL. When you add&debug=1
near the top you see a (sorted) list of name tags it looks for.What do you mean? The below url produces the exact sam eresults:
https://nominatim.openstreetmap.org/search?q=ag%C3%A1rd+hungary&format=json&name:hu&accept-language=hu,en
I mean adding 'name:hu' tags to the villiages (https://www.openstreetmap.org/node/354944716) just like they have 'name:ru' tags.
Please have a look at https://wiki.openstreetmap.org/wiki/Names#Localization for an explanation of localized names.
And Zemplénagárd also has Wikipedia and Wikidata tags, which I believe give a higher ranking when the name is the same.
Adding &name:hu=* does not affect anything in the query: https://nominatim.openstreetmap.org/search?q=ag%C3%A1rd+hungary&format=json&name:hu=*
I mean adding 'name:hu' tags to the villages (https://www.openstreetmap.org/node/354944716) just like they have 'name:ru' tags.
Does the search engine not work like, that if there is a match in the name, then that is ranked as first match, and if there is not exact match, then localized names will be searched as well? It is annoying, that an exact match in the localized name (name:sk) is ranked higher, than an exact match in the name. On the other hand, if I search for York, then New York will be ranked higher, if it has more Wikipedia tag / content?
Adding &debug=1 to the URL, e.g. https://nominatim.openstreetmap.org/search?q=ag%C3%A1rd+hungary&format=json&debug=1&accept-language=hu,en will show which name tags are searches near the top. It's an array (sorted list) but afaik there is no special ranking based on tag name. Wikipedia ranking is based on (1) there is a link (2) number of other wikipedia pages linking to the article. That inter-linking data is a couple of years old though.