software · Q1628
Fuse.js
JavaScript fuzzy-search library for searching local strings and structured records.
Overview
Fuse.js is a JavaScript library for approximate string matching over lists and selected fields in records. It can support command palettes, filters and lookups without requiring an embedding model. Its character-based matching is distinct from semantic retrieval, and the application remains responsible for providing the searchable dataset.[1][7]
Search within an application
Applications supply a collection and choose the keys to search. Results identify matching items and can include a relevance score. ESM and CommonJS imports are documented, with full and basic builds exposing different capabilities. The inspected repository manifest and documentation banner identify 7.6.0-beta.0, while some setup examples pin 7.5.0. Generated examples should be matched to an installed release; current worker and token features should not be assumed available in every older package.[2][8]
Why a visible term may not match
Threshold, expected location and distance interact in fuzzy matching. With the documented defaults, matches far from the start of a field can be excluded even when the desired characters occur in its text. ignoreLocation removes that positional influence. Key weights and field-length normalization also affect ranking. Tuning a search therefore requires representative queries and fields, rather than treating the first plausible result as a guarantee of relevance.[3]
Multi-word queries
Token search treats query words separately and combines their contributions with inverse-document-frequency weighting. Its default any mode can return records matching only part of the query. The all option requires every word to match somewhere in the record, including across separate fields or array elements. This differs from logical operators that combine field-specific clauses. The distinction matters when a search box is intended to narrow a filter instead of rank partial matches.[4]
Workers and API differences
The documented FuseWorker shards data across Web Workers. Search returns a promise, results contain structured-cloned records rather than original object references, and resources need terminate when no longer used. It does not expose getIndex or the ordinary remove(predicate) interface; replacing a filtered collection is the documented removal route. Custom sorting or getter functions cannot be transferred and are rejected. Moving a synchronous implementation to workers consequently requires more than adding await. FuseWorker also rejects useTokenSearch because independently computed shard statistics would change token scores. It requires a browser Web Worker environment and an accessible worker script; it does not use Node.js worker_threads. The site’s Content Security Policy must permit the worker to start.[5]
Dataset and performance considerations
Index creation depends on collection size, number of indexed keys and string length. Search work also grows with the indexed entries and query terms. A prebuilt index can move index-construction work away from the interactive path, but does not eliminate the cost of searching the collection. The vendor publishes benchmark examples; no speed, memory or dataset-size guarantee was independently measured for this article.[6]
License and scope
The inspected source uses Apache License 2.0, with its redistribution and notice requirements. Local library use does not require a hosted search account. The separate cloud offering shown on the website is marked forthcoming and should not be treated as an established dependency of the open-source toolkit.[1][9]
Substitution considerations
Fuse.js can substitute for FlexSearch in application-level record lookup when approximate character matching and its data-loading model fit the task. FlexSearch emphasizes configurable indexes, fields and storage options. Their scoring, queries and index representation require migration work. Fuse's own semantic-search comparison supports the narrower distinction between character similarity and meaning; its broad vendor performance comparisons are not adopted here.[2][7][10]
Capabilities & limitations
Fuzzy field search
supportedMatches selected fields with configurable score, key weight and location behavior.[2][3]
Adding fuzzy lookup and local record search to applications · Web, JavaScript, TypeScript, Node.js, Deno · Version, build and integration requirements apply
2 sources · check evidence
Threshold, location, distance and field normalization
vendor · checked 2026-10-07ESM/CJS imports, fields and full/basic builds
vendor · checked 2026-10-07Multi-word token matching
supportedInspected documentation supports any/all token modes; match the documented version and full build.[4][8]
Adding fuzzy lookup and local record search to applications · Web, JavaScript, TypeScript, Node.js, Deno · Version, build and integration requirements apply
2 sources · check evidence
Per-term matching and any/all modes
vendor · checked 2026-10-07Inspected version 7.6.0-beta.0 and exports
vendor · checked 2026-10-07Worker execution
limitedAsynchronous browser-worker API returns cloned records; rejects function-valued options and useTokenSearch. Requires an accessible worker script and compatible CSP; not Node.js worker_threads.[5][8]
Adding fuzzy lookup and local record search to applications · Modern browsers with Web Workers · Version, build and integration requirements apply
2 sources · check evidence
Asynchronous API, structured clones and unsupported function options
vendor · checked 2026-10-07Inspected version 7.6.0-beta.0 and exports
vendor · checked 2026-10-07Semantic similarity
unsupportedCharacter-based matching does not establish retrieval by meaning.[7]
Adding fuzzy lookup and local record search to applications · Web, JavaScript, TypeScript, Node.js, Deno · Version, build and integration requirements apply
1 source · check evidence
Character matching versus meaning; vendor comparison
vendor · checked 2026-10-07Can substitute for
These are products or services this entry can replace. Check the task and limitations for each comparison.
FlexSearch for Adding fuzzy lookup and local record search to applications
limitedCan replace local search for fuzzy record lookup where its matching and dataset costs are acceptable; index formats, scoring and persistence are not interchangeable.[2][6][10]
Web, JavaScript, TypeScript, Node.js, Deno · Version, build and integration requirements apply
References
- Fuse.js overview
Local fuzzy search and available builds
vendor · retrieved 2026-10-07 - Fuse.js getting started
ESM/CJS imports, fields and full/basic builds
vendor · retrieved 2026-10-07 - Fuzzy search options
Threshold, location, distance and field normalization
vendor · retrieved 2026-10-07 - Token search
Per-term matching and any/all modes
vendor · retrieved 2026-10-07 - FuseWorker
Asynchronous API, structured clones and unsupported function options
vendor · retrieved 2026-10-07 - Fuse performance guide
Dataset/key costs and prebuilt indexes
vendor · retrieved 2026-10-07 - Fuse versus semantic search
Character matching versus meaning; vendor comparison
vendor · retrieved 2026-10-07 - Fuse package manifest
Inspected version 7.6.0-beta.0 and exports
vendor · retrieved 2026-10-07 - Fuse Apache license
Apache 2.0 terms
vendor · retrieved 2026-10-07 - FlexSearch document search
Field indexing and document search
vendor · retrieved 2026-10-07
Discussion & disputes
Ask about unclear claims or explain a concern with supporting sources. If you have a specific fix, suggest a correction.
No discussion yet.
Revision history
Open a revision to read an earlier version of this article.
| Revision | Timestamp | Edit summary |
|---|---|---|
| 1741 | 2026-10-21 23:43:09 | /* wbeditentity-create-item:0| */ sf:6e8fa306-38f9-45aa-8f75-341da8b17208:v2 | Scope FuseWorker to browser Web Workers and add its documented token-search incompatibility, worker-script and CSP requirements. Preserve ordinary Fuse runtime | attribution: /proposals/6e8fa306-38f9-45aa-8f75-341da8b17208 |