platform-coop-toolkit / coop-map-directory-index

The Map/Directory/Index component of the Platform Cooperative Development Kit.
https://directory.platform.coop
BSD 3-Clause "New" or "Revised" License
1 stars 3 forks source link

Search should support full country names as opposed to country codes #160

Open greatislander opened 4 years ago

greatislander commented 4 years ago

Is your feature request related to a problem? Please describe.

Currently it's only possible to search for countries by two-letter country codes (e.g. UK, US, CA).

Describe the solution you'd like

Search by country name our approximate country name should be supported.

Describe alternatives you've considered

Filtering by country could also help narrow down results (see #51).

Additional context

This is not supported by the upstream library that's used in the directory. See: https://github.com/SmileyChris/django-countries/issues/242. Because countries are stored in the database by country code, a data normalization step as described in https://github.com/SmileyChris/django-countries/issues/242#issuecomment-593149386 needs to be added to support fuzzy search by country name.