Static low-bandwidth search at scale
pagefind.app
pagefind.app
The documentation is really short, which is a good thing to me as it seems simple. Algolia feels way too overkill for some static sites so a simpler one is appreciated.
I couldn't find how it compares to Algolia anywhere. One thing I could clearly notice in the xkcd demo (and even the documentation) was speed. Algolia has instant searches on such a large site like HN[1].
The UI is at par, or even better than Algolia, with so many customisation options.
Of course, Algolia is a mature project and this is in its infancy. I hope this takes off and proves to be a worthy competition.
The giant difference between the two is that Algolia is a hosted search platform, so there exists a server that you send an API request to that can return the search results. This is pretty quick — they'll probably have a lot of the search data sitting in memory already (which is what you're paying for).
Pagefind isn't a platform, everything required to search a site is static along with the site. As a result, to search through a site you need to load some amount of it into the browser and then query it. Other javascript search libraries load everything up front and give you instant search, but Pagefind prioritizes bandwidth over search — on large sites the existing libraries can take a few MB of bandwidth up front to initialize their data.
With Pagefind, very little is loaded until you type in a search term. Once you start typing, a chunk of the search index is loaded containing your search word(s) and is then queried. This is what drives the performance you're seeing, which is predominantly the time for the data to load after you start typing — the query step itself is near-instant.
The goal is sites that are currently limited to paying for a platform like Algolia now have a path to add search without any infrastructure, but without burdening the end-user with enormous network requests.
If there's anything specific that you're wondering I'm happy to elaborate
I look forward to use it with a few Hugo themes :). All the best!