How it works
Search runs directly against Postgres — there is no external Algolia or Meilisearch instance to manage, and no indexing step after deploy. Every time a page is synced from your GitHub repo, a stored tsvector column is regenerated automatically with weighted content:
| Weight | Field | Description |
| A (highest) | frontmatter.title | Matches against the page title rank first |
| B | frontmatter.description | Near-first hit boost for description matches |
| C | URL path | Keyword-in-URL matches |
| D (lowest) | page body | Full-text fallback |
When a reader submits a query, the platform calls websearch_to_tsquery — the same query parser Postgres uses for Google-style searches. That means your users can write:
"custom domain" exact phrase
authentication OR oauth either term
components -accordion exclude a termKeyboard shortcuts
Open search
⌘K on macOS, Ctrl+K on Windows/Linux, or / from any page
Navigate
↑ and ↓ to move through results
Open result
↵ Enter to navigate to the highlighted result
Close
Esc to dismiss the modal and return to the page
Result ranking
Results are ordered by ts_rank, which scores matches based on frequency, term weight, and proximity. Short snippets with <mark> highlighting appear under each result so readers can confirm relevance before clicking.
If a reader searches for a term and gets zero results, that usually signals a content gap. In Phase 7 you will see these queries in your analytics dashboard — a great input for the next pages to write.
What to write for better search
The weighted ranking rewards well-structured pages. You don't need to do anything special — just follow good documentation habits:
Write a clear
titlein frontmatter. It carries the highest rank weight.Add a
descriptionof 1–2 sentences explaining the page. Boosts near-first hits.Use descriptive URL paths.
/configuration/custom-domainranks better than/config/cd.Lead with the keyword. The first 200 characters matter most for snippet extraction.
Semantic search (coming in Phase 5)
Keyword search is Phase 1. In Phase 5 the same modal will gain a sparkle toggle for AI mode — hybrid keyword + vector search powered by pgvector embeddings and reciprocal rank fusion. Readers will be able to ask natural-language questions and get results that match intent, not just keywords.
No action needed on your side. When Phase 5 ships, your existing docs will be embedded automatically and the AI toggle appears in the modal. Your ⌘K habits transfer 1:1.