osm-search / Nominatim

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

San Francisco with CA state abbreviation search returns incorrect information #1375

Closed sundisc closed 2 years ago

sundisc commented 5 years ago

Hi, I was just trying out Nominatim and I came across an issue where a search for San Francisco, CA returns a clothing store. Search: San Francisco, CA Result: San Francisco, Chemin de la Savane, Gatineau, Outaouais, Quebec, J8T 5B9, Canada

Searching with the complete state name correctly returns the city. Search: San Francisco, California Result: The city boundaries of San Francisco

I performed both searches from the UI at nominatim.openstreetmap.org

Please let me know if I can provide any information and I will try, but I'm brand new to this project :)

lonvia commented 5 years ago

We give preference to the country code over state code. Mostly, this is what is wanted. I've experimentally changed that on nominatim.openstreetmap.org. Let's see if that leads to complaints.

Please leave this ticket open, so I remember to check in on the effects in a couple of weeks.

lonvia commented 5 years ago

I've reverted the change. It prevents from showing the right results when searching for two letter country codes.

charleshan commented 4 years ago

Also happening for Berkeley, CA and many others that use (city, state) format. I understand that the problem is not as simple as giving preference to the country code or state code but this is the not the expected behavior.

lonvia commented 2 years ago

US state abbreviations should mostly work now that we have stopped ignoring them as stop words.

nica0012 commented 11 months ago

Is it possible to return short form for state and province? For example (Miami, FL)

mtmail commented 11 months ago

@nica0012 The issue was closed 2 years ago. You can open a new issue or start a new discussion.