finds.dev← search

// the find

bvaughn/js-search

★ 2,221 · JavaScript · MIT · updated May 2023

JS Search is an efficient, client-side search library for JavaScript and JSON objects

A client-side full-text search library for JavaScript objects, with configurable tokenization, stemming, stop words, and TF-IDF ranking. It's for apps that need offline or in-memory search without shipping a server or a heavy dependency like Lunr. Works on any plain JS/JSON data.

TF-IDF ranking is on by default and can be swapped for a simpler unordered index when you don't need relevance scoring. The index strategy is properly separated — prefix, exact, and all-substrings are distinct implementations you pick at config time rather than runtime flags. Nested field indexing via array path (e.g. ['author', 'name']) works without flattening your data first. The architecture is clean: sanitizer, tokenizer, index strategy, and search index are all independently replaceable interfaces.

Last commit was May 2023 and there's no sign of active maintenance — open issues aren't getting responses. No async/Web Worker support in the main library (the author points to a separate repo for that), which means indexing large datasets blocks the main thread. English-only stop words and no built-in stemmer mean non-English use requires assembling the right third-party pieces yourself. Memory usage with AllSubstringsIndexStrategy on large datasets will hurt — indexing every substring of every token is an O(n²) space problem the docs don't warn you about.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →