Getting instant help by the DeepWiki AI assistant:
![]()
Basic Start • API Reference • Encoder • Document Search • Persistent Indexes • Using Worker • Tag Search • Highlighting • Resolver • Changelog
FlexSearch has been helping developers around the world build powerful, efficient search functionalities for years. Maintaining and improving the library requires significant time and resources. If you’ve found this project valuable and you're interested in supporting the project, please consider donating. Thanks a lot for your continued support!
<img src="https://github.com/nextapps-de/flexsearch/raw/0.8.2/doc/antithesis_logo.svg" width="200" alt="Donate using Open Collective">
Antithesis Operations LLC
FlexSearch performs queries up to 1,000,000 times faster compared to other libraries by also providing powerful search capabilities like multi-field search (document search), phonetic transformations, partial matching, tag-search, result highlighting or suggestions.
Bigger workloads are scalable through workers to perform any updates or queries to the index in parallel through dedicated balanced threads.
The latest generation v0.8 introduce Persistent Indexes, well optimized for scaling of large datasets and running in parallel. All available features was natively ported right into the database engine of your choice.
FlexSearch was nominated by the GitNation for the "Best Technology of the Year".
Supported Platforms: - Browser - Node.js
Supported Database: - InMemory (Default) - IndexedDB (Browser) - Redis - SQLite - Postgres - MongoDB - Clickhouse
Supported Charsets: - Latin - Chinese, Korean, Japanese (CJK) - Hindi - Arabic - Cyrillic - Greek and Coptic - Hebrew
Common Code Examples:
Demos: - Auto-Complete
Benchmarks: - Performance Benchmark - Matching Benchmark
Latest Benchmark Results
The benchmark was measured in terms per seconds, higher values are better (except the test "Memory"). The memory value refers to the amount of memory which was additionally allocated during search.
| Library | Memory | Query: Single | Query: Multi | Query: Large | Query: Not Found |
|---|---|---|---|---|---|
| flexsearch | 16 | 50955718 | 11912730 | 13981110 | 51706499 |
| jsii | 2188 | 13847 | 949559 | 1635959 | 3730307 |
| wade | 980 | 60473 | 443214 | 419152 | 1239372 |
| js-search | 237 | 22982 | 383775 | 426609 | 994803 |
| minisearch | 4777 | 30589 | 191657 | 5849 | 304233 |
| orama | 5355 | 29445 | 170231 | 4454 | 225491 |
| elasticlunr | 3073 | 14326 | 48558 | 101206 | 95840 |
| lunr | 2443 | 11527 | 51476 | 88858 | 103386 |
| ufuzzy | 13754 | 2799 | 7788 | 58544 | 9557 |
| bm25 | 33963 | 3903 | 4777 | 12657 | 12471 |
| fuzzysearch | 300147 | 148 | 229 | 455 | 276 |
| fuse | 247107 | 422 | 321 | 337 | 329 |
Run Comparison: Performance Benchmark "Gulliver's Travels"
Extern Projects & Plugins: - React: https://github.com/angeloashmore/react-use-flexsearch - Vue: https://github.com/Noction/vue-use-flexsearch - Gatsby: https://www.gatsbyjs.org/packages/gatsby-plugin-flexsearch/ - Nikola: https://plugins.getnikola.com/v8/flexsearch_plugin/
[!TIP] Understanding those 3 elementary things about FlexSearch will improve your results significantly: Tokenizer, Encoder and Suggestions
npm install flexsearch
The dist folder is located in: node_modules/flexsearch/dist/
It is not recommended to use the
/src/folder of this repository as it requires some kind of conditional compilation to resolve the build flags. The/dist/folder contains every version you might need including unminified ES6 modules. When none of the/dist/folder versions works for you please open an issue. Alternatively you can read more about Custom Builds.
Download Builds
| Build | File | CDN |
| flexsearch.bundle.min.js | Download | https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.2/dist/flexsearch.bundle.min.js |
| flexsearch.bundle.debug.js | Download | https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.2/dist/flexsearch.bundle.debug.js |
| flexse |
$ claude mcp add flexsearch \
-- python -m otcore.mcp_server <graph>