Features

Full-text search

FTS5 trigram search over text and rich text, for the admin and the public site.


The engine indexes non-hidden text and richtext fields in the FTS5 table cms_search with the trigram tokenizer, so any language works but queries need at least 3 characters. Each document has a live row and a working row: public search sees only live content, admin search sees working copies.

  • GET /_cms/search?q=&limit=&locale=: collections the caller may list

  • GET /_public/_search?q=&limit=&locale=: collections whose public rule allows the caller

Results are bm25-ranked { items: [{ collection, id, snippet }] } with matches wrapped in <mark>. Collections whose rule only exposes the caller's own documents are skipped. POST /_cms/search/reindex (admin) rebuilds the index; the reference app wraps it as bun run db:reindex.