# Fuse\.js

JavaScript fuzzy\-search library for searching local strings and structured records\.

ID: Q1628 · Revision: 1741

Type: software · License: Apache\-2\.0[^license] · Status: active

Website: https://www.fusejs.io/



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\.[^home][^semantic]

## 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\.[^start][^package]

## 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\.[^fuzzy]

## 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\.[^token]

## 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\.[^worker]

## 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\.[^performance]

## 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\.[^license][^home]

## Substitution considerations

Fuse\.js can substitute for [FlexSearch](/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\.[^start][^flex][^semantic]

## Capabilities and substitutions

### Fuzzy field search — supported

Matches selected fields with configurable score, key weight and location behavior\.[^start][^fuzzy]

Use case: Adding fuzzy lookup and local record search to applications · Platforms: Web, JavaScript, TypeScript, Node\.js, Deno · Region: Version, build and integration requirements apply

### Multi\-word token matching — supported

Inspected documentation supports any/all token modes; match the documented version and full build\.[^token][^package]

Use case: Adding fuzzy lookup and local record search to applications · Platforms: Web, JavaScript, TypeScript, Node\.js, Deno · Region: Version, build and integration requirements apply

### Worker execution — limited

Asynchronous 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\.[^worker][^package]

Use case: Adding fuzzy lookup and local record search to applications · Platforms: Modern browsers with Web Workers · Region: Version, build and integration requirements apply

### Semantic similarity — unsupported

Character\-based matching does not establish retrieval by meaning\.[^semantic]

Use case: Adding fuzzy lookup and local record search to applications · Platforms: Web, JavaScript, TypeScript, Node\.js, Deno · Region: Version, build and integration requirements apply

### [Substitute for FlexSearch](/flexsearch) — limited

Can replace local search for fuzzy record lookup where its matching and dataset costs are acceptable; index formats, scoring and persistence are not interchangeable\.[^start][^performance][^flex]

Use case: Adding fuzzy lookup and local record search to applications · Platforms: Web, JavaScript, TypeScript, Node\.js, Deno · Region: Version, build and integration requirements apply

## References

[^home]: [Fuse\.js overview](<https://www.fusejs.io/>) — Local fuzzy search and available builds (vendor; retrieved 2026-10-07T23:40:39Z)

[^start]: [Fuse\.js getting started](<https://www.fusejs.io/getting-started.html>) — ESM/CJS imports, fields and full/basic builds (vendor; retrieved 2026-10-07T23:41:02Z)

[^fuzzy]: [Fuzzy search options](<https://www.fusejs.io/fuzzy-search.html>) — Threshold, location, distance and field normalization (vendor; retrieved 2026-10-07T23:41:11Z)

[^token]: [Token search](<https://www.fusejs.io/token-search.html>) — Per\-term matching and any/all modes (vendor; retrieved 2026-10-07T23:41:11Z)

[^worker]: [FuseWorker](<https://www.fusejs.io/web-workers.html>) — Asynchronous API, structured clones and unsupported function options (vendor; retrieved 2026-10-07T23:41:02Z)

[^performance]: [Fuse performance guide](<https://www.fusejs.io/performance.html>) — Dataset/key costs and prebuilt indexes (vendor; retrieved 2026-10-07T23:41:28Z)

[^semantic]: [Fuse versus semantic search](<https://www.fusejs.io/articles/vs-semantic-search.html>) — Character matching versus meaning; vendor comparison (vendor; retrieved 2026-10-07T23:41:28Z)

[^package]: [Fuse package manifest](<https://github.com/krisk/Fuse/blob/main/package.json>) — Inspected version 7\.6\.0\-beta\.0 and exports (vendor; retrieved 2026-10-07T23:41:21Z)

[^license]: [Fuse Apache license](<https://github.com/krisk/Fuse/blob/main/LICENSE>) — Apache 2\.0 terms (vendor; retrieved 2026-10-07T23:41:11Z)

[^flex]: [FlexSearch document search](<https://github.com/nextapps-de/flexsearch/blob/master/doc/document-search.md>) — Field indexing and document search (vendor; retrieved 2026-10-07T23:41:28Z)

Source revision: https://substitutefor.net/entities/Q1628?revision=1741
