Skip to content

search inside Jesus's words when the filter is on - #204

Merged
Bij4n merged 2 commits into
mainfrom
search-inside-red-text
Oct 11, 2026
Merged

Bij4n merged 2 commits into
mainfrom
search-inside-red-text

Conversation

@Bij4n

@Bij4n Bij4n commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Makes the search filter mean what it says.

Before: ticking the box kept any verse Jesus speaks in, so a search for love could return a verse where loved is in the narration and his words say something else.

Now: keyword search matches only inside the red text, and the result snippet shows his words alone. The checkbox reads Search only the words of Jesus.

How

  • New column verses.red_text: a verse's red passages on their own, NULL when it has none.
  • The importer, the KJV mirror and the red-letter patch write it beside red_letter_ranges, so it stays in step with any future import or correction.
  • The migration fills it for verses already imported. Locally that was 4,132 verses in about three seconds. db:prepare runs it on deploy; no manual step.
  • Verse.search_red_text searches the new column; SearchService uses it when the filter is on.

Not changed

Concept search still filters by verse (a verse he speaks in), because its matching is by meaning across the whole verse, not by words.

Specs

Model specs for the red text and the new scope; importer, mirror and patch specs that it is written; service specs that a narration-only match is excluded and that the snippet is his words. The verse factory now fills red_text the way the importer does.

Local check against the full data: love with the filter returns 20 results, all matching inside his words; publicans returns 6.

Bij4n added 2 commits October 11, 2026 01:05
verses.red_text holds a verse's red passages joined together, or NULL
when it has none. The importer, the KJV mirror and the red-letter patch
write it beside red_letter_ranges, and the migration fills it for
verses already imported (4,132 locally, a few seconds).

Verse.search_red_text searches it, so a match has to be inside his
words.
With the filter ticked, keyword search now matches only inside the red
text, and the highlighted snippet shows his words alone. Before, it
kept any verse he speaks in, so a match could sit in the narration.

The checkbox reads 'Search only the words of Jesus'. Concept search
still filters by verse.
@Bij4n
Bij4n merged commit d7001d9 into main Oct 11, 2026
5 checks passed
@Bij4n
Bij4n deleted the search-inside-red-text branch October 11, 2026 08:13
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