Problem: When users search for a multi-word phrase that doesn't exist verbatim in the Bible, they get zero results. A smarter system would fall back to searching for individual words.
Solution: If a phrase search returns no results, automatically fall back to searching for each word individually and combine the results.
Not included: Edit-distance fuzzy matching or "did you mean?" suggestions.
Expected behavior:
TODO: Define the fallback UX — should results show automatically or ask the user?
TODO: Design feedback for when fallback occurs (e.g., "No exact match. Showing results for individual words.")
Implementation:
Reference: BibleGame fell back to individual word search when phrase found nothing.
Files:
apps/web/src/lib/server/queries/search.ts (modify)Current: NEEDS_DESIGN Milestone: Foundation Priority: Low — edge case improvement
Design questions:
Dependencies: