minisearch
https://github.com/lucaong/minisearch/
MiniSearchis a tiny but powerful in-memory fulltext search engine written in JavaScript. It is respectful of resources, and it can comfortably run both in Node and in the browser.
MiniSearchaddresses use cases where full-text search features are needed (e.g. prefix search, fuzzy search, ranking, boosting of fields…), but the data to be indexed can fit locally in the process memory. While you won't index the whole Internet with it, there are surprisingly many use cases that are served well byMiniSearch. By storing the index in local memory,MiniSearchcan work offline, and can process queries quickly, without network latency.
I ended up using this for this sites' search function after being unhappy with the results from both FlexSearch and Fuse, and I'm happy enough with it. The code for it is here if you want to see what a usage of the library looks like
see also: FlexSearch pagefind Fuse