Show all search results with dates, fix transliteration substring false-positive - #178
Merged
Conversation
…teration substring false-positive
Search results page:
- Show every matching saint, not just ones with a story -- story-less
results render unlinked (nothing useful on the detail page for them)
and grayed out instead of being hidden entirely.
- Show each result's commemoration date(s) in a right-aligned table
column, so the reason for a story-less result (and disambiguation
between same-named saints) is visible without clicking through.
- Single-result auto-redirect now only fires when that result actually
has a page to go to.
Fix a real search bug found via this: normalize_transliteration("Mary")
produces "mari" (the y->i rule), and a plain substring match against the
normalized field made that match any name starting with "mari" --
Marinus, Marina, Mariamne, Samaria, Photini, etc. Switched the
normalized-field match to a word-boundary regex instead of icontains,
since that field only exists to compare whole transliterated names, not
serve as another partial-substring field (name/full_name/title still use
icontains, unaffected).
Also fixed 3 "martyr"/"hieromartyr" misspellings ("marytyr", "maryr")
found via their accidental false-positive matches in a "Mary" search.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #175/#176/#177.
Search results page redesign (reversing part of #176's story-filter):
Fixed a real transliteration search bug:
normalize_transliteration("Mary")produces"mari"(they->irule), and matching that as a plain substring against the normalized field made "Mary" match any name starting with those letters -- Marinus, Marina, Mariamne, Samaria, Photini, etc. Switched to a word-boundary regex match, since the normalized field only exists to compare whole transliterated names against each other, not serve as another partial-substring search field.Also fixed 3 "martyr"/"hieromartyr" misspellings ("marytyr", "maryr") in the data, found via their accidental false-positive matches in a "Mary" search.
Test plan
🤖 Generated with Claude Code
https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3