Search
A per-tenant full-text search index built at sync time, with a Cmd/Ctrl-K command palette and an edge-cached query API.
A per-tenant full-text search index built at sync time, with a Cmd/Ctrl-K command palette and an edge-cached query API.
Every Papervine site ships with full-text search over its own content. The index is built during content sync and stored per tenant, so each docs site searches only its own pages — never the platform’s or another tenant’s.
Search is part of the v1 surface area. The exact engine choice (see below) is still being finalized; the index shape — what gets indexed and the query API contract — is the stable part.
When a site syncs, Papervine extracts searchable text from every published page and writes a tenant-scoped index. The index covers:
#anchor)Readers query that index two ways:
Cmd/Ctrl-K opens a command-palette UI with full keyboard navigation and
recent/suggested entries. This is the primary reader-facing surface.
GET /api/search?q=… returns results for the current tenant. The endpoint is
edge-cached, so repeated and popular queries are fast and cheap.
Cmd/Ctrl-K is search; Cmd/Ctrl-I is the AI assistant. They
are deliberately distinct surfaces — one finds pages, the other answers questions.
The search engine is a pluggable provider, selected per tenant via config:
Because the index is built from your synced content rather than a proprietary store, the provider can change without changing your source files.
The same indexed content also backs search_docs, the retrieval tool the
AI assistant and the read MCP server use
to answer questions. Keyword search powers both the human-facing palette and the agentic
retrieval loop; a semantic (embeddings) backend can be added later behind the same
search_docs contract without changing how either surface calls it.