software · Q1089
FlexSearch
Configurable full-text search library with field indexes, workers and persistent storage adapters.
Overview
FlexSearch is an open-source search library for browser and Node.js applications. It offers simple text indexes, structured document search and optional worker or persistent-storage configurations. Applications choose how to encode content, which fields to index and how to present results rather than receiving a complete hosted search service.[1][2]
Fields, storage and result shape
A simple Index accepts ID/content pairs; a Document index adds selected fields and optional document storage. Default search results are grouped by field and contain IDs, while enrichment adds stored documents and merge combines fields by ID. The descriptor distinguishes searchable fields from fields retained only for display. The documentation limits a document's root shape and does not support its ID nested inside an array; such sequential structures need flattening before indexing.[2]
Encoding changes what can be found
The default encoder normalizes characters, deduplicates repeated letters and retains alphanumeric content while filtering other characters. This can help matching, but it can also remove symbols that distinguish codes, usernames or technical terms. The encoder permits custom inclusion rules and provides different language-oriented configurations. Search behavior therefore depends on the chosen encoding pipeline, not only on the raw source strings.[3]
Worker integration
Worker indexes use promise-returning methods. Document workers distribute work by fields. When a field configuration contains custom functions, the guide requires an external configuration module instead of assuming the functions can pass through a worker message. Bundled worker generation can conflict with strict Content Security Policy; documented alternatives include non-bundled modules or an explicit worker file. These deployment details should be verified before adopting a generated worker setup.[4]
Persistent versus in-memory indexes
Persistent adapters include IndexedDB for browsers and several server databases. The guide requires awaiting mounting before access and describes automatic asynchronous batch commits. An explicit awaited commit can establish completion of pending updates. Export/import remains available for in-memory indexes, so exporting an index and mounting a persistent adapter are different workflows. A UI update alone should not be treated as confirmation that an asynchronous storage operation has completed.[5]
Migration and reset risks
The persistent-index guide states that no migration tool is currently provided. It warns that clear and destroy operate on database contents associated with the configured store name, including truncation or dropping tables. An application's migration plan must treat those operations as destructive rather than harmless cache refreshes, and isolate store names accordingly. No reset or migration was executed during this research.[5]
Pagination considerations
Queries are limited by default, and the document guide says the complete result count cannot be pre-counted. A search interface that displays a definitive total or arbitrary numbered pages needs its own strategy rather than assuming the index provides a database-style count query. Query options and result grouping should be reflected explicitly in the interface.[2]
License and comparative scope
FlexSearch is released under Apache License 2.0. It can be considered alongside Fuse.js for application-level search, but replacing one requires revisiting field configuration, matching behavior and result handling. FlexSearch's documentation advertises substantial performance advantages; this article does not adopt those figures as an independently verified comparison. Licensing the library does not supply hosting, storage administration or a managed search endpoint.[1][6][7]
Capabilities & limitations
Structured document search
supportedIndexes selected fields with optional stored-document enrichment and result merging.[2]
Embedding indexed text search in browser and Node.js applications · Web, JavaScript, TypeScript, Node.js · Version, build and integration requirements apply
1 source · check evidence
Descriptor, result shape, storage, count and sequential-data limitations
vendor · checked 2026-10-07Persistent index storage
supportedAdapters include IndexedDB and server databases; initialization and commit timing require asynchronous handling.[5]
Embedding indexed text search in browser and Node.js applications · Web, JavaScript, TypeScript, Node.js · Version, build and integration requirements apply
1 source · check evidence
Adapters, async commit and destructive clear/destroy operations
vendor · checked 2026-10-07Worker integration
limitedWorker methods return promises; custom functions need external configuration and strict CSP may require non-bundled workers.[4]
Embedding indexed text search in browser and Node.js applications · Web, JavaScript, TypeScript, Node.js · Version, build and integration requirements apply
1 source · check evidence
Promise methods, custom configuration files and CSP
vendor · checked 2026-10-07Automatic migration tooling
unsupportedThe inspected persistent-index guide states that no migration tool is provided.[5]
Embedding indexed text search in browser and Node.js applications · Web, JavaScript, TypeScript, Node.js · Version, build and integration requirements apply
1 source · check evidence
Adapters, async commit and destructive clear/destroy operations
vendor · checked 2026-10-07Can substitute for
These are products or services this entry can replace. Check the task and limitations for each comparison.
Fuse.js for Embedding indexed text search in browser and Node.js applications
limitedCan replace local record search when field indexes and configurable storage fit better; matching, result shape and index formats differ.[2][7]
Web, JavaScript, TypeScript, Node.js · Version, build and integration requirements apply
References
- FlexSearch overview
Browser/Node library, worker and persistent index options
vendor · retrieved 2026-10-07 - Document search
Descriptor, result shape, storage, count and sequential-data limitations
vendor · retrieved 2026-10-07 - Encoder guide
Default normalization, deduplication and alphanumeric filtering
vendor · retrieved 2026-10-07 - Worker parallelism
Promise methods, custom configuration files and CSP
vendor · retrieved 2026-10-07 - Persistent indexes
Adapters, async commit and destructive clear/destroy operations
vendor · retrieved 2026-10-07 - FlexSearch Apache license
Apache 2.0 terms
vendor · retrieved 2026-10-07 - Fuse.js getting started
Collection-based fuzzy lookup
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 |
|---|---|---|
| 1137 | 2026-10-13 21:01:16 | /* wbeditentity-create-item:0| */ sf:0e3fd380-bd4b-461c-aa0c-0fb0f5fd07b4:v1 | Add FlexSearch with encoder effects, document result shape, asynchronous persistence and destructive reset caveats. | attribution: /proposals/0e3fd380-bd4b-461c-aa0c-0fb0f5fd07b4 |