mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-24 20:09:02 +00:00
The search dialog used `type: 'hanzo'`, POSTing to a remote auth-gated API a public static site can't call — every query silently returned empty. The `/api/search` route also froze to the force-static empty-query `[]`. - route: export `staticGET` (the whole flexsearch index) instead of the dynamic GET; tokenize `forward` (prefix / as-you-type) over titles + section headings only. A full-body forward index exceeds V8's max string length and OOMs the export; headings-only is ~20MB / 1.7MB gzipped. - dialog: `type: 'flexsearch-static'` from /api/search — no server, no auth. - core: wire the missing `flexsearch-static` case into useDocsSearch; re-export buildIndexDefault so the route can tag pages (All/Services/SDKs/API/Products). Verified on the built out/api/search: agents 85, authentication 113, getting started 40, prefix "deplo"->/docs/deploy; all five filters return results.