After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747017 - Weird results searching for "Rio de"
Weird results searching for "Rio de"
Status: RESOLVED FIXED
Product: libgweather
Classification: Core
Component: general
3.16.x
Other Linux
: Normal normal
: future
Assigned To: libgweather-maint
libgweather-maint
Depends on:
Blocks:
 
 
Reported: 2015-03-30 11:26 UTC by Bastien Nocera
Modified: 2015-04-17 00:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
LocationEntry: fix database matching in the presence of whitespace (1.49 KB, patch)
2015-04-17 00:46 UTC, Giovanni Campagna
committed Details | Review

Description Bastien Nocera 2015-03-30 11:26:48 UTC
Searching for "Rio de " (note the trailing space), shows towns like "Brandywine Creek" and "Fork branch".

Searching for "Rio de" shows towns in the state of Rio de Janeiro (including the eponymous city).
Comment 1 Giovanni Campagna 2015-04-17 00:25:42 UTC
Searching for "Rio de " with the trailing space for some reason triggers a geocode-glib instead of the local db search, so the problem is that geocode-glib (or nominatim, really) returns those for "rio de ".
Maybe it matches on the Mexican name of nearby rivers? They seem to be American cities near the southern border.
Comment 2 Giovanni Campagna 2015-04-17 00:46:32 UTC
Created attachment 301769 [details] [review]
LocationEntry: fix database matching in the presence of whitespace

Trailing whitespace should prevent prefix matches but not cause
matching failures altoghether (trying to call find_word with
a length of 0)
Comment 3 Giovanni Campagna 2015-04-17 00:48:15 UTC
The previous patch fixed the specific case of whitespace, the remaining bug is that geocode-glib has nonsensical results for "rio de" but I'm closing this one.