City search “Hospitalet” doesn’t find L'Hospitalet de Llobregat

Bug #1590462 reported by Albert Astals Cid
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu UX
Fix Released
Undecided
Paty Davila
geonames (Ubuntu)
Fix Released
Undecided
Albert Astals Cid
unity8 (Ubuntu)
Triaged
Undecided
Lukáš Tinkl

Bug Description

The official name of my city is
  L'Hospitalet de Llobregat
but it is often usually written as
  Hospitalet de Llobregat

On the wizard city/timezone selection window we only search from the beginning of the string so I could not find my city until i realized i may have to type the
  L'
at the beginning.

<https://wiki.ubuntu.com/TimeAndDate#search>: “As with any search field, any series of letters immediately followed by a space or punctuation character should match only complete words, while any series of letters at the end of the string should match both complete words and the beginnings of words. (In the terms being searched, a “word” is a series of letters that is immediately preceded by the start of the string or any non-letter character, and immediately followed by the end of the string or any non-letter character.)”

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity8 (Ubuntu):
status: New → Confirmed
Changed in unity8 (Ubuntu):
status: Confirmed → Incomplete
Changed in unity8 (Ubuntu):
assignee: nobody → Lukáš Tinkl (lukas-kde)
Paty Davila (dizzypaty)
Changed in ubuntu-ux:
assignee: nobody → Paty Davila (dizzypaty)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Another good example of such a city that can be spelled in different ways is https://en.wikipedia.org/wiki/The_Hague

Michael Terry (mterry)
Changed in geonames (Ubuntu):
assignee: nobody → Michael Terry (mterry)
Revision history for this message
Paty Davila (dizzypaty) wrote :

Agreed. Please change it to compare the string and portions of the string so it displays matching results. Thanks.

Changed in unity8 (Ubuntu):
status: Incomplete → Triaged
Changed in ubuntu-ux:
status: New → Fix Released
Changed in geonames (Ubuntu):
assignee: Michael Terry (mterry) → Albert Astals Cid (aacid)
status: New → In Progress
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

I’ve just discussed this with Paty and we agreed on the following.

Search should work the same way in the first-run setup as it does in System Settings.

If those two search the same way, then comparing “the string and [any] portions of the string” would regress bug 1454186. Fortunately, the actual bug can be fixed without doing that (making this bug report, incidentally, one more example of how “should” in a bug summary is presumptive.)

In the spec for Time & Date settings I wrote: “As with any other search field, any word you enter that is followed by a space or punctuation should be treated as a complete word, while any word that is not should be treated as if it might be either a complete word or the beginning of a word.”

That wasn’t as precise as it needed to be. But I would have expected searching “Hospitalet” to return “L'Hospitalet de Llobregat” without doing full substring matching, because in the result it is preceded by an apostrophe and so counts as the start of a separate “word”. Spec updated. <https://wiki.ubuntu.com/TimeAndDate?action=diff&rev2=112&rev1=111>

description: updated
summary: - Wizard city search should do searches in the middle of names
+ City search “Hospitalet” doesn’t find L'Hospitalet de Llobregat
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package geonames - 0.2+17.04.20170220-0ubuntu1

---------------
geonames (0.2+17.04.20170220-0ubuntu1) zesty; urgency=medium

  * Be less strict on city search (LP: #1590462)

 -- Albert Astals Cid <email address hidden> Mon, 20 Feb 2017 11:07:52 +0000

Changed in geonames (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.