osm-search / Nominatim

Open Source search based on OpenStreetMap data
https://nominatim.org
GNU General Public License v3.0
3.18k stars 712 forks source link

Increase priority of iata code matches for upper case input #1513

Closed matkoniecz closed 5 years ago

matkoniecz commented 5 years ago

For example I think that it is desirable to give FAO airport as the first match for FAO seatch, not Le Fao stream, Fao hamlet, Fao village, Le Fao dwelling and Fao locality.

See https://www.openstreetmap.org/search?query=FAO

https://www.openstreetmap.org/search?query=FAO%20airport works

matkoniecz commented 5 years ago

Also, why "PMI airport" finds Ronald Reagan Airport over one with matching iata code?

https://www.openstreetmap.org/search?query=PMI+airport#map=15/38.8514/-77.0405 over

lonvia commented 5 years ago

Well, the problem here is that I'm not convinced that IATA codes are known and used by many people outside the small group of aviation aficionados. So even if Nominatim had any way to increase priority for a specific tag, I would be hesitant to do it.

Airports follow the same prioritisation schema as everything else, which is mostly dominated by wikipedia link importance. And in the grand schema of things, the airport of Faro is really not very important. (The good news for you is that their importance will increase a bit once #1475 has been deployed.) If we change that unilaterally for one kind of tag, there is a good chance that a lot of other search results suddenly get much worse. That is especially true for very short terms. So the search in general would need a redesign before something like 'if the search term consists of a three letter word, then give IATA codes a higher priority' can be made to work.

If you have a website where you prefer the IATA codes to be prioritised, then I recommend having a look at this years SOTM talk which talks about how to integrate Overpass into your search for specific requirements like this one.

Regarding "PMI airport", that's explained in above talk as well. The search "PMI airport" searches for two things: airports called PMI and airports near PMI. It then mixes the two results and orders them by priority.

matkoniecz commented 5 years ago

IATA codes appear to be used also by normal travelers. For example Skyscanner, azair Search engines for flights use IATA identifiers.

See https://www.skyscanner.pl/ prepopulated search box or http://www.azair.eu/ box or on sites of at least some airlines - see listing of airports in Wizzair search results https://wizzair.com/pl-pl?gclid=EAIaIQobChMIpJHQn8qC5QIVybTtCh1cQA_BEAAYASAAEgKP2_D_BwE&gclsrc=aw.ds#/booking/select-flight/BLL/VIE/2019-10-06/null/1/0/0/0/null

IATA code is also quite important as names of airports are often intentionally misleading.

I would need to check more but I am pretty sure that IATA codes are not used solely by very narrow group. I can research it a bit more of useful and check it more thoroughly.

matkoniecz commented 5 years ago

If you have a website where you prefer the IATA codes to be prioritised, then I recommend having a look at this years SOTM talk which talks about how to integrate Overpass into your search for specific requirements like this one.

No, I am just an individual user of standard OSM search.

'if the search term consists of a three letter word, then give IATA codes a higher priority' can be made to work.

I think that uppercase may be treated as hint. For example I think that Fao should not get boost to IATA codes, but FAO should. Not sure is it easily feasible within Nominatim architecture.

lonvia commented 5 years ago

Citing a whole bunch of aviation websites kind of proves my point, doesn't it?

I think that uppercase may be treated as hint. For example I think that Fao should not get boost to IATA codes, but FAO should. Not sure is it easily feasible within Nominatim architecture.

No, sorry, not going to happen. Three letter abbreviations are simply too common to be able to make useful assumptions about the intentions of the searcher.

I'm closing this issue now as too domain-specific. Airports will get a boost with the updated Wikipedia importances which should solve the general issue that they tend to appear low on the result list. That's all that can be done here. Please do not open further issues about IATA codes.

matkoniecz commented 5 years ago

Treating "people searching for plane ticket" and "small group of aviation aficionados" as similarly unimportant group seems weird to me.

Please do not open further issues about IATA codes.

Ok

karussell commented 2 years ago

I agree that a three letter code is too short, but what about the code plus its city? E.g. when I search for "BER Berlin" https://nominatim.openstreetmap.org/ui/search.html?q=BER+berlin

I would have expected it as the IATA code is known.

(Or also via "airport berlin" it is not able to find it.)

lonvia commented 2 years ago

There is a small but important detail, that makes the search for 'BER Berlin' fail: BER is not in Berlin. It's in Brandenburg. ;) This is a very frequent (and annoying) issue with airports. They never are where everybody thinks they are.

BER airport or Flughafen BER gets you the expected results.

karussell commented 2 years ago

Ah, this is indeed interesting :D Thanks.