I am having trouble with the wikipediaSearch service. The first result returned for the string "http://ws.geonames.org/wikipediaSearch?q=New%20York%20City" is for the New York - New York hotel and casino in Las Vegas. The first result returned for a geonames homepage search or a wikipedia web page search is for New York City. I have similar problems with other locations (Denver%20Colorado, London%20England, etc.).
What's up with that? How can I force the service to return the correct article? Should I format the query differently?
It seems that the population of the city does not account enough for the relevance in the search engine result position. I will put it on the nice-to-have list and find an improvement when the time allows.
You could try to use the 'title' parameter to search only in the title.
On my nice-to-have list, higher up than a population check, is to check if the title of the Wikipedia page (or one of its redirects) matches the search query exactly. If so, put it first in the results list.