Web’s fastest and most memory-flexible full-text search library with zero dependencies.
When it comes to raw search speed FlexSearch outperforms every single searching library out there and also provides flexible search capabilities like multi-word matching, phonetic transformations or partial matching. Depending on the used options it also provides the most memory-efficient index. Keep in mind that updating and/or removing existing items from the index has a significant cost. When your index needs to be updated very often then BulkSearch may be a better choice. FlexSearch also provides you a non-blocking asynchronous processing model as well as web workers to perform any updates or queries on the index in parallel through dedicated balanced threads.
FlexSearch Server is also available here: https://github.com/nextapps-de/flexsearch-server.
Installation Guide • API Reference • Presets • Custom Builds • Flexsearch Server • Changelog
Supported Platforms:
- Browser
- Node.js
Demos:
Library Comparison:
Get Latest (Stable Release):
Build | File | CDN |
flexsearch.min.js | Download | https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@master/dist/flexsearch.min.js |
flexsearch.light.js | Download | https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@master/dist/flexsearch.light.js |
flexsearch.compact.js | Download | https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@master/dist/flexsearch.compact.js |
flexsearch.custom.js | Custom Build |
All Features:
Feature | flexsearch.min.js | flexsearch.compact.js | flexsearch.light.js |
Presets | ✔ | ✔ | – |
Async Search | ✔ | ✔ | – |
Web-Worker Sharding (not available in Node.js) | ✔ | – | – |
Contextual Indexes | ✔ | ✔ | ✔ |
Index Documents (Field-Search) | ✔ | ✔ | – |
Partial Matching | ✔ | ✔ | ✔ |
Multi-Phrase Search | ✔ | ✔ | ✔ |
Relevance-based Scoring | ✔ | ✔ | ✔ |
Auto-Balanced Cache by Popularity | ✔ | – | – |
Suggestions (Results) | ✔ | – | – |
Phonetic Matching | ✔ | ✔ | – |
Customizable: Matcher, Encoder, Tokenizer, Stemmer, Filter | ✔ | ✔ | ✔ |
File Size (gzip) | 5.0 kb | 3.9 kb | 2.7 kb |
It is also pretty simple to make Custom Builds
Benchmark Ranking
Comparison: Benchmark “Gulliver’s Travels”
Query Test: “Gulliver’s Travels”
Rank | Library Name | Library Version | Single Phrase (op/s) | Multi Phrase (op/s) | Not Found (op/s) |
1 | FlexSearch *** | 0.3.6 | 363757 | 182603 | 1627219 |
2 | Wade | 0.3.3 | 899 | 6098 | 214286 |
3 | JS Search | 1.4.2 | 735 | 8889 | 800000 |
4 | JSii | 1.0 | 551 | 9970 | 75000 |
5 | Lunr.js | 2.3.5 | 355 | 1051 | 25000 |
6 | Elasticlunr.js | 0.9.6 | 327 | 781 | 6667 |
7 | BulkSearch | 0.1.3 | 265 | 535 | 2778 |
8 | bm25 | 0.2 | 71 | 116 | 2065 |
9 | Fuse | 3.3.0 | 0.5 | 0.4 | 0.7 |
Memory Test: “Gulliver’s Travels”
Rank | Library Name | Library Version | Index Size * | Memory Allocation ** |
1 | FlexSearch **** | 0.3.1 | 1.33 Mb | 20.31 kb |
2 | Wade | 0.3.3 | 3.18 Mb | 68.53 kb |
3 | Fuse | 3.3.0 | 0.22 Mb | 156.46 kb |
4 | JSii | 1.0 | 8.9 Mb | 81.03 kb |
5 | bm25 | 0.2 | 6.95 Mb | 137.88 kb |
6 | BulkSearch | 0.1.3 | 1.53 Mb | 984.30 kb |
7 | Elasticlunr.js | 0.9.6 | 11.83 Mb | 68.69 kb |
8 | Lunr.js | 2.3.5 | 16.24 Mb | 84.73 kb |
9 | JS Search | 1.4.2 | 36.9 Mb | 53.0 kb |
* Index Size: The size of memory the index requires
** Memory Allocation: The amount of memory which was additionally allocated during a row of 10 queries
*** The preset “fastest” was used for this test
**** The preset “memory” was used for this test
Library Comparison: Benchmark “Gulliver’s Travels”

We are a world class software startup focusing on building scalable, high-performance web & mobile application. We have started our journey back in 2015. And in those years we have provided support for more than 15 thousand customers over the world. We build products that create values. RedQ, Inc