Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search landing page events by country #1046

Open
iandunn opened this issue Sep 20, 2023 · 1 comment
Open

Search landing page events by country #1046

iandunn opened this issue Sep 20, 2023 · 1 comment
Milestone

Comments

@iandunn
Copy link
Member

iandunn commented Sep 20, 2023

See https://wordpress.slack.com/archives/C05JYJJRNKB/p1695174318897539?thread_ts=1694779015.219089&cid=C05JYJJRNKB

Searching for indonesia should show the events in Jakarta, for example.

Possible approaches:

  1. MySQL JOIN to geonames_summary or similar table based on the country code in wporg_events. This is probably the simplest if the only thing we need is the country name. Would probably need some kind of GROUP_CONCAT though, to condense the joined rows into a single field. We'll probably want name, asciiname, and alternativenames so that folks can search by endonym etc.
  2. Use the api.w.org/events endpoint. That might be more DRY than writing new code, and possibly give higher quality results, but would be slower. We'd probably also need to adapt the endpoint to fit this context, since we're not searching via IP etc.
  3. Convert the country codes in wporg_events into country names on the fly, based on an array mapping codes to names. the geonames* tables are probably more comprehensive, though.
  4. Add country name column to wporg_events- no, because it'd be more accurate/comprehensive to JOIN to geonames*
  5. add search_terms column to wporg_events - maybe if there's additional data, but if country is the only thing then geonames* is probably better.

Related WordPress/wporg-mu-plugins#476

@iandunn
Copy link
Member Author

iandunn commented Dec 12, 2023

We have a filter for country now, so this may be less important

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant