I use Astro SSG and Cloudflare Pages. I use
https://github.com/cloudcannon/pagefind for search on my Astro setup. You can test the search functionality here
https://tinyrocket.pages.dev/.
From its repo: "Pagefind runs after any static site generator and automatically indexes the built static files. Pagefind then outputs a static search bundle to your website, and exposes a JavaScript search API that can be used anywhere on your site."
Pagefind is cool!