chore: update project context
This commit is contained in:
+10
-4
@@ -553,17 +553,23 @@ SSR and DS have parent chapters with sub-chapters stored as individual `prose_ch
|
||||
|
||||
- **Powered by Typesense** via the BFF (`/api/v1/search` proxied through `/api/search`)
|
||||
- **9 indexed content types** combined into 8 user-facing filters: Books (verses + prose), Letters, Transcriptions, Glossary, Essays, Journals, Magazines, Other Documents
|
||||
- **Multi-select filters** — click multiple type tabs to combine (e.g., Books + Letters); "All" deselects everything
|
||||
- **URL state sync** — `/search?q=surrender&type=books,letters` is shareable and bookmarkable
|
||||
- **Header search button** — `HeaderSearchButton` component on every page header expands into a search input on click; press `/` from anywhere to trigger
|
||||
- **Books filter** combines verses and prose into one tab (sends `type=verses,prose` to the BFF)
|
||||
- **Multi-select filters** — clicking multiple type tabs combines them (e.g., Books + Letters); clicking "All" clears all filters
|
||||
- **URL state** — `q`, `type`, and `page` are synced to the URL (e.g. `/search?q=foo&type=books,letters&page=2`), so any search is shareable and bookmarkable
|
||||
- **Pagination** — appears both above the results (compact: prev/next + page count) and below them
|
||||
- **Result cards** — the entire card is a clickable `Link` that navigates to the source page
|
||||
- **Header search** — `HeaderSearchButton` on every page header expands into a search input on click; the `/` keyboard shortcut opens the search input from any page
|
||||
- **300ms debounce** on input
|
||||
- **Highlighted snippets** — matched text wrapped in `<mark>` tags
|
||||
- **Typo tolerance** — "Krishna", "Krsna", "Krishn" all find Kṛṣṇa results
|
||||
- **Diacritic insensitivity** — `_ascii` shadow fields indexed alongside originals (e.g., "Yashodanandana" matches "Yaśodanandana")
|
||||
- **Prefix matching** — partial words like "sarv dharman parit" match `sarva-dharmān parityajya`
|
||||
- **Clickable result cards** — entire card navigates to the source page
|
||||
- **Glossary results** — glossary pages read `?term=` from the URL so a search result lands on the correct term (with diacritic-insensitive matching)
|
||||
- **Defensive null handling** — the frontend always treats a null `results` payload as an empty array
|
||||
- Files: `app/search/page.tsx`, `app/search/search-content.tsx`, `app/api/search/route.ts`, `components/header-search.tsx`
|
||||
|
||||
**Search relevance.** Search is tuned to find verses where the verse text itself contains the query, not commentaries that cite it. Verse purports are intentionally excluded from the default search so results stay focused on primary sources. In practice this means searching for `sarva dharman parityajya` returns BG 18.66 first (the actual verse) rather than the many commentaries that quote it.
|
||||
|
||||
### Per-Page Filters
|
||||
- Books page: diacritic-aware search (typing "Krsna" matches "Kṛṣṇa")
|
||||
- Glossary page: full-text search across terms and definitions
|
||||
|
||||
Reference in New Issue
Block a user