Problem: Users need to find specific words, phrases, or concepts across the entire Bible. Manual searching through 31,000+ verses is impractical.
Solution: FTS5-powered full-text search across both English (BSB) and Dutch (Statenvertaling) translations, with instant results ranked by relevance.
Not included: Semantic/meaning-based search or AI-powered search. This is keyword matching with stemming.
Users type a search query and get instant results from across the Bible, with the option to search in English, Dutch, or Greek (Strong's concordance).
User flow:
/searchEdge cases:
expandDutchQuery() with morphological synonyms (see Dutch Synonym Expansion)Search input: Large search box with magnifying glass icon, "Type at least 2 characters" placeholder.
Mode tabs: NL | EN | Greek — switches between translation-specific and concordance search.
Results: Verse cards with book/chapter/verse reference + full verse text. Jesus-speech results shown in gold.
Keyboard hints: Footer shows "Type to search | Up/Down history | Tab toggle Jesus-only | Enter jump | Esc back"
FTS5 index: verse_texts_fts virtual table with porter and unicode61 tokenizers — indexes text from verse_texts table.
API: GET /api/search?q=...&translation=...&lang=...&jesusOnly=...&page=...&limit=50
Query building (search.ts):
"word" and space-joinedexpandDutchQuery() maps 14 known Bible terms to morphological OR groups, unknown words get word* prefix matchingJOIN jesus_speech js ON js.verse_id = v.idrankTables: verse_texts_fts, verse_texts, verses, books, bible_translations, jesus_speech
Files:
apps/web/src/routes/api/search/+server.ts — API endpointapps/web/src/lib/server/queries/search.ts — searchVerses(), query buildingapps/web/src/lib/server/queries/dutch-synonyms.ts — expandDutchQuery()apps/web/src/routes/(app)/search/+page.svelte — search UICurrent: DONE Milestone: v1 Priority: Core — essential Bible study tool
History:
Dependencies: