GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Relevancy of search results?  XML
Forum Index -> General
Author Message
mhuggins



Joined: 20/06/2008 00:12:34
Messages: 18
Location: Downingtown, PA
Offline

In using the basic "search" web service, I'm attempting to search for city "Bear" in state "Delaware" within the U.S. My search URL is laid out as follows:

http://ws.geonames.org/search?q=bear,+de&featureClass=P&style=long

I can't seem to figure out why the second result is showing up when it doesn't have "bear" or "de" anywhere in its returned values.

Is there a way to show the relevancy of the results or something like that?
[WWW]
mhuggins



Joined: 20/06/2008 00:12:34
Messages: 18
Location: Downingtown, PA
Offline

Okay, after pulling this up, I realized that one of the alternate country names there is "Bear", which is why it was returned in the results. However, I'd still like to know if there is a way to check the relevancy of the result compared to what was requested. (Are results returned as "most relevant" first?)

On a separate note, I'm also wondering if there's a way to get any of the admin codes via a search call to the web service, or if I need to perform a search followed by a get just for this one field.
[WWW]
marc



Joined: 08/12/2005 07:39:47
Messages: 4501
Offline

The search result is ordered by relevancy.

I don't get the second point. The admin codes are included in the search service. Why do you need a second call?

Or would you prefer the geonameid instead of the admin code? There is another thread where a user is asking for the geonameid to be used for admin divs for which we don't have yet an admin code:
http://forum.geonames.org/gforum/posts/list/943.page
We could even go further then what the poster suggests and completely switch to the geonameid and use the admin code(s) as additional table.

Best

Marc

[WWW]
mhuggins



Joined: 20/06/2008 00:12:34
Messages: 18
Location: Downingtown, PA
Offline

Thanks for the info regarding the relevancy, marc.

Also, sorry for the confusion on my second point. I'm attempting to search using the "search" web service. If I'm searching for "bear, de" (city Bear in state DE/Delaware within the U.S.), there is no field returned to show that it is in fact the state of DE where the result was found (as opposed to country DE/Germany, for example). See the example of what I mean below:

http://ws.geonames.org/search?q=bear+de&featureClass=P&style=long
[WWW]
marc



Joined: 08/12/2005 07:39:47
Messages: 4501
Offline

Oh, I see. The full information is available with style=full:
http://ws.geonames.org/search?q=bear,de&featureClass=P&style=full

Marc

[WWW]
mhuggins



Joined: 20/06/2008 00:12:34
Messages: 18
Location: Downingtown, PA
Offline

marc wrote:
Oh, I see. The full information is available with style=full:
http://ws.geonames.org/search?q=bear,de&featureClass=P&style=full

Marc 

Bah! I'm an idiot. I thought style=long was the highest I could go. Thanks for correcting me!
[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team