govuk-country-and-territory-autocomplete icon indicating copy to clipboard operation
govuk-country-and-territory-autocomplete copied to clipboard

Synonyms are not always shown in the results list

Open timpaul opened this issue 7 years ago • 1 comments

In the example below you can see that when typing 'un', 'Burma' is returned as a result, but with no alias given, which makes it hard to understand why it's in the list (same goes for 'Egypt').

image

If you look in the data you’ll see:

  1. A country code, MM, which is named ‘Burma’
  2. A synonym for MM, which is named ‘Union of Burma’

So it appears to be matching the ‘Un’ of ‘Union of Burma’, but not outputting the synonym in the list. This may be a design choice rather than a bug, but in this example it's producing a confusing result.

timpaul avatar Dec 02 '17 12:12 timpaul

I think this may be related to it having old data.

The synonyms have a concept of being 'canonical' or 'non-canonical' - are they official or not. A typo would be non-canonical, whilst an official name would. Matches against canonical names get shown in brackets, but not non-canonical ones don't show in brackets - in this case, 'Union of Burma' should probably be marked as canonical. At one point there were many cases like this and I think we were waiting on an updated data file.

edwardhorsford avatar Dec 02 '17 15:12 edwardhorsford