Skip to content

Add card aliases to server-side search - #993

Open
makgit9623 wants to merge 2 commits into
ThronesDB:masterfrom
makgit9623:mak-2026-10-add-card-aliases-search
Open

makgit9623 wants to merge 2 commits into
ThronesDB:masterfrom
makgit9623:mak-2026-10-add-card-aliases-search

Conversation

@makgit9623

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for community card aliases in the server-side card search, allowing players to find specific card editions using nicknames and abbreviations.

Alias matching extends the existing search logic without replacing standard name, acronym, or card code searches.

Changes

  • Add a shared JSON registry containing 157 validated card editions and their aliases.
  • Resolve alias matches using unique card codes.
  • Support partial alias searches by complete words.
  • Support multi-word aliases with or without quotation marks.
  • Normalize spaces, punctuation, and hyphens during alias matching.
  • Support multiple aliases per card and shared aliases across cards.
  • Preserve existing card name, acronym, and card code searches.
  • Preserve combined search filters and existing AND/OR behavior.
  • Gracefully fall back to standard search when the alias registry is unavailable.

Expected behavior

  • danny → Five specific Daenerys Targaryen editions (currently at this time)
  • kevin → Bodyguard (Core).
  • kevin costner → Bodyguard (Core).
  • "kevin costner" → Bodyguard (Core).
  • fat cat → Catelyn Stark (WotN).
  • ikea → The Iron Throne (Core) and Chamber of the Painted Table (Core).
  • ikea-kit → Same results as ikea kit.
  • core → Cards with aliases containing the word "core".
  • Standard title searches continue to work and return each card only once.
  • Combined filters such as f:stark "fat cat" remain restricted by faction.

Scope

Modified files:

  • public/card_aliases.json
  • src/Services/CardsData.php

No database schema, card data, or search syntax changes.

Testing

Full Symfony integration and regression testing have not been performed. Maintainer validation is requested before merging.

Add a shared JSON registry of 157 card editions and community aliases, identified by unique card codes and organized alphabetically for easier maintenance.
Add case-insensitive whole-word alias matching to standard card searches using unique card codes, preserving name, acronym, card code and combined search filters.
@stopfstedt stopfstedt self-assigned this Nov 4, 2026
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.

2 participants