Esc

Start typing to search the docs

Search

Five interchangeable backends behind one switch — Pagefind, Orama, FlexSearch, Typesense, and Chroma.

2 min read · 345 words

View as Markdown

Picking a backend

SVOCS ships five interchangeable search backends behind one switch: Pagefind (the zero-config default), Orama, FlexSearch, Typesense, and Chroma. Every page in the docs UI — the ⌘K dialog, keyboard navigation, result rendering — is identical no matter which one is active; only how the index gets built and queried changes.

Set PUBLIC_SVOCS_SEARCH_PROVIDER at build time to switch:

PUBLIC_SVOCS_SEARCH_PROVIDER=orama bun run build

Leave it unset and you get Pagefind — nothing to configure, nothing to run.

The three shapes

BackendHow the index is builtWho runs itLive server?
PagefindWASM search index generated from your built HTMLA post-build CLI stepNo
OramaRaw page content shipped as static JSON, indexed in-browserPart of the static buildNo
FlexSearchSame idea, different in-browser index libraryPart of the static buildNo
TypesenseContent pushed to a collection on your Typesense serverA sync script after the buildYes, self-hosted or cloud
ChromaContent pushed to a collection on your Chroma server (semantic search — server embeds it for you)A sync script after the buildYes, self-hosted

Pagefind, Orama, and FlexSearch never leave the static-only story SVOCS is built around — nothing to run, nothing to host, nothing that can go down. Typesense and Chroma trade that away for a live, queryable server: better relevance tuning and (for Chroma) genuine semantic search, at the cost of standing up and securing a server the browser talks to directly.

Adding a backend to a scaffolded project

create-svocs-docs only ships Pagefind by default, to keep a fresh scaffold’s install small. The other four backends are documented, working code you copy in when you actually want them — each backend’s page below has the exact files and the one package to install.