NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi,
I run a query about a Hungarian city, named Agárd:
https://nominatim.openstreetmap.org/search?q=ag%C3%A1rd+hungary&format=json
but strangely:

  • the first result is Zemplénagárd
  • the second result is Ősagárd
  • only the third result is Agárd
Why is it so?
Why an exact name match is not put on the first place of the result list?

asked 18 Apr '19, 10:47

Mocsi's gravatar image

Mocsi
66115
accept rate: 0%


The city Zemplénagárd (https://www.openstreetmap.org/node/354944716) has a Slovak name of name:sk=Agard. Same for https://www.openstreetmap.org/node/736023948 Maybe that's a mapping error?

permanent link

answered 18 Apr '19, 10:56

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

Definitely error. Both are Hungarian cities.

(18 Apr '19, 13:09) Mocsi

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.

(18 Apr '19, 13:38) scai ♦

Slovak Wikipedia tells us that the Slovakian names for Zemplénagárd and Ősagárd are indeed Agard and Agárd, respectively.

(18 Apr '19, 13:39) TZorn
2

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.

(18 Apr '19, 14:07) mtmail
1
(23 Apr '19, 09:01) Mocsi

I mean adding 'name:hu' tags to the villiages (https://www.openstreetmap.org/node/354944716) just like they have 'name:ru' tags.

(23 Apr '19, 20:05) mtmail
1

Please have a look at https://wiki.openstreetmap.org/wiki/Names#Localization for an explanation of localized names.

(23 Apr '19, 21:14) TZorn

And Zemplénagárd also has Wikipedia and Wikidata tags, which I believe give a higher ranking when the name is the same.

(24 Apr '19, 04:09) escada

Adding &name:hu=* does not affect anything in the query: https://nominatim.openstreetmap.org/search?q=ag%C3%A1rd+hungary&format=json&name:hu=*

(29 Apr '19, 13:33) Mocsi

I mean adding 'name:hu' tags to the villages (https://www.openstreetmap.org/node/354944716) just like they have 'name:ru' tags.

(29 Apr '19, 13:36) mtmail

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?

(29 Apr '19, 13:46) Mocsi
2

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.

(29 Apr '19, 14:00) mtmail
showing 5 of 12 show 7 more comments

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×193
×133

question asked: 18 Apr '19, 10:47

question was seen: 2,275 times

last updated: 29 Apr '19, 14:00

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum