Then I looked into using Algolia's main product, but I couldn't figure out how to set it up. Very poor onboarding experience. I got frustrated with the constant paywalls just trying to piece together how the product would work -- "request access to Crawlers", "contact us to learn more." At this point, I'm not even sure if Algolia supports static sites.
What I'd love is to have an automated crawler peel through my site and automatically create an index, and then give me a library that I can use to include a search bar on my site.
I want to pay for a quality product. I do not want to self-host or manage my own index.
Are there any alternatives for static sites? What do you use?
This was a while ago so maybe there's better libraries for it but I've integrated https://lunrjs.com/ before for searching a few 100 FAQs with lengthy answers. You create a static search index file of your articles at build time that's served to the client (it was ~20KB compressed) to search with using JavaScript.
The indexing file will grow with the number of documents you have but not sure at what stage this approach becomes impractical (does anyone have any benchmarks?). Worth looking into because you can create a completely custom search UI that updates instantly plus there's nothing extra to host or pay for as it's all static.
Edit: This lists similar libraries plus benchmarks: https://github.com/nextapps-de/flexsearch
Today, you’d run a binary as part of a site’s build or deploy process, feeding in the input files. It generates a search index which you deploy alongside your site. The project’s JS library will load that index and turn it into a client-side interactive search interface.
I’d be curious to see if this sounds interesting or workable for you - you mentioned that you don’t want to host your own index, but does that change if “hosting the index” feels similar to hosting an image, instead of spinning up a server?
I’d be interested in building a paid addition that will crawl your site & host the index - you’re probably the 2nd person I’ve seen with that suggestion. Please let me know if you’d be interested in being a beta user.
It generally works really well and it makes sense that a static site could use a static index. I'm still surprised more documentation tools haven't copied the approach.
Why? ain't very hard and for a small site, it is very fast too...
I used Lucene in the past and had zero complaints