Skip to content

Add first-class site aliases - #110

Merged
janhelcl merged 8 commits into
mainfrom
feature/site-aliases
Aug 27, 2026
Merged

Add first-class site aliases#110
janhelcl merged 8 commits into
mainfrom
feature/site-aliases

Conversation

@janhelcl

Copy link
Copy Markdown
Owner

Summary

  • add a site_aliases table with normalized aliases and uniqueness per site
  • search canonical names and aliases through the same deterministic ranking engine
  • keep public REST/MCP output canonical (site_id, name) with no MCP schema change
  • seed Bassano/Monte Grappa and Meduno/Valinis aliases
  • reload aliases during FORCE_INITIAL_DATA_LOAD
  • add regression tests for ranking, deduplication, fuzzy alias matching, and DB integration

Ranking

Within each match class canonical names outrank aliases:

  1. exact canonical
  2. exact alias
  3. prefix canonical
  4. prefix alias
  5. substring canonical
  6. substring alias
  7. fuzzy canonical
  8. fuzzy alias

An exact alias can therefore beat a weaker canonical prefix/substring match.

Deployment

Migration seeds existing populated databases using INSERT ... SELECT. Fresh/full reloads use app/data/site_aliases.csv, so aliases survive site replacement.

@janhelcl
janhelcl merged commit f12108d into main Aug 27, 2026
3 checks passed
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

Successfully merging this pull request may close these issues.

1 participant