| Author |
Message |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 14/07/2013 22:22:29
|
jamessw
Joined: 14/07/2013 19:29:40
Messages: 1
Offline
|
I'm using Geonames to provide a way for users to type in a location. However, I'm finding it doesn't return as many results as I'd expect.
To replicate- Restrict the search to California, and search for "San".
Expected- All places with "San" in their name would be returned.
Actual- Only 3 places returned- San Diego, San Juan Capistrano, and San Pablo. (No San Francisco, etc)
Get URL - http://api.geonames.org/searchJSON?adminCode1=CA&countryBias=US&featureClass=A&featureClass=P&featureClass=H&featureClass=L&featureClass=T&fuzzy=0.5&name=San&style=MEDIUM&username=demo
Any suggestions for increasing the number of results?
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 17/07/2013 09:28:57
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4501
Offline
|
You should remove the fuzzy parameter from your query. With the fuzzy parameter the search does some sort of exact name search with spelling variations. Without the fuzzy parameter it is looking for all names with the search term in the name. The reason is that with the fuzzy search you get tons of more result and in your case you would match nearly the entire database.
Marc
|
 |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 07/10/2016 15:46:33
|
Marijn
Joined: 10/05/2016 17:56:50
Messages: 1
Offline
|
For the situation described in the (old) post below it seems reasonable that the search is abandoned. However, for other situations this is less clear. How exactly is this behaviour determined/implemented?
For example, the following query does not return any results:
http://api.geonames.org/searchJSON?q=Roubaix,%20Nord-Pas-de-Calais&username=demo&maxRows=1&fuzzy=0.8
With fuzzy=1 the expected result is returned. This is particularly inconvenient when using the Geocoder library for Python, which has a GeoNames module with a fixed setting of 0.8 for the fuzzy parameter.
Is there a setting to use fuzzy search on composite names, or is this simply not possible?
|
|
|
 |
|
|