GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Results are too restrictive  XML
Forum Index -> General
Author Message
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?
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

[WWW]
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?
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team