Web’s fastest and most memory-flexible full-text search library with zero dependencies.
Basic Start • API Reference • Document Indexes • Using Worker • Changelog
Support this Project
You can help me by making a personal donation to keep this project alive and also to provide all the contribution to solve your needs.
Sponsors
When it comes to raw search speed FlexSearch outperforms every single searching library out there and also provides flexible search capabilities like multi-field search, phonetic transformations or partial matching.
Depending on the used options it also provides the most memory-efficient index. FlexSearch introduce a new scoring algorithm called “contextual index” based on a pre-scored lexical dictionary architecture which actually performs queries up to 1,000,000 times faster compared to other libraries. 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.
Supported Platforms:
- Browser
- Node.js
Library Comparison “Gulliver’s Travels”:
Plugins (extern projects):
- 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/
Get Latest
Build File CDN
flexsearch.bundle.js Download https://rawcdn.githack.com/nextapps-de/flexsearch/0.7.31/dist/flexsearch.bundle.js
flexsearch.light.js Download https://rawcdn.githack.com/nextapps-de/flexsearch/0.7.31/dist/flexsearch.light.js
flexsearch.compact.js Download https://rawcdn.githack.com/nextapps-de/flexsearch/0.7.31/dist/flexsearch.compact.js
flexsearch.es5.js * Download https://rawcdn.githack.com/nextapps-de/flexsearch/0.7.31/dist/flexsearch.es5.js
ES6 Modules Download The /dist/module/ folder of this Github repository
- The bundle “flexsearch.es5.js” includes polyfills for EcmaScript 5 Support.
Get Latest (NPM)
npm install flexsearch
Compare Web-Bundles
The Node.js package includes all features from
flexsearch.bundle.js.
Feature flexsearch.bundle.js flexsearch.compact.js flexsearch.light.js
Presets ✓ ✓ -
Async Search ✓ ✓ -
Workers (Web + Node.js) ✓ - -
Contextual Indexes ✓ ✓ ✓
Index Documents (Field-Search) ✓ ✓ -
Document Store ✓ ✓ -
Partial Matching ✓ ✓ ✓
Relevance Scoring ✓ ✓ ✓
Auto-Balanced Cache by Popularity ✓ - -
Tags ✓ - -
Suggestions ✓ ✓ -
Phonetic Matching ✓ ✓ -
Customizable Charset/Language (Matcher, Encoder, Tokenizer, Stemmer, Filter, Split, RTL) ✓ ✓ ✓
Export / Import Indexes ✓ - -
File Size (gzip) 6.8 kb 5.3 kb 2.9 kb
Performance Benchmark (Ranking)
Run Comparison: Performance Benchmark “Gulliver’s Travels”
Operation per seconds, higher is better, except the test “Memory” on which lower is better.
Rank Library Memory Query (Single Term) Query (Multi Term) Query (Long) Query (Dupes) Query (Not Found)
1 FlexSearch 17 7084129 1586856 511585 2017142 3202006
2 JSii 27 6564 158149 61290 95098 534109
3 Wade 424 20471 78780 16693 225824 213754
4 JS Search 193 8221 64034 10377 95830 167605
5 Elasticlunr.js 646 5412 7573 2865 23786 13982
6 BulkSearch 1021 3069 3141 3333 3265 21825569
7 MiniSearch 24348 4406 10945 72 39989 17624
8 bm25 15719 1429 789 366 884 1823
9 Lunr.js 2219 255 271 272 266 267
10 FuzzySearch 157373 53 38 15 32 43
11 Fuse 7641904 6 2 1 2 3




!