Getting instant help by the DeepWiki AI assistant:
[](https://deepwiki.com/nextapps-de/flexsearch)
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 |
Feature | flexsearch.bundle.js | flexsearch.compact.js | flexsearch.light.js |
Presets | ✓ | ✓ | ✓ |
Async Processing | ✓ | ✓ | - |
Workers (Web + Node.js) | ✓ | - | - |
Context Search | ✓ | ✓ | ✓ |
Document Search | ✓ | ✓ | - |
Document Datastore | ✓ | ✓ | - |
Partial Matching | ✓ | ✓ | ✓ |
Auto-Balanced Cache by Popularity/Last Queries | ✓ | ✓ | - |
Tag Search | ✓ | ✓ | - |
Suggestions | ✓ | ✓ | ✓ |
Phonetic Search (Fuzzy Search) | ✓ | ✓ | - |
Encoder | ✓ | ✓ | ✓ |
Export / Import Indexes | ✓ | ✓ | - |
Resolver | ✓ | - | - |
Result Highlighting | ✓ | ✓ | - |
Persistent Index (IndexedDB) | ✓ | - | - |
File Size (gzip) | 16.3 kb | 11.4 kb | 4.5 kb |
Option | Values | Description | Default |
preset |
"memory" "performance" "match" "score" "default" |
The configuration profile as a shortcut or as a base for your custom settings. |
"default" |
tokenize |
"strict" / "exact" "tolerant" "forward" "reverse" / "bidirectional "full" |
Indicates how terms should be indexed by tokenization. | "strict" |
resolution | Number | Sets the scoring resolution | 9 |
encoder |
new Encoder(options) Charset.Exact Charset.Default Charset.Normalize Charset.LatinBalance Charset.LatinAdvanced Charset.LatinExtra Charset.LatinSoundex Charset.CJK false |
Choose one of the built-in encoder Read more about Encoder |
"default" |
encode | function(string) => string[] | Pass a custom encoding function Read more about Encoder |
"default" |
context |
Boolean Context Options |
Enable/Disable context index. When passing "true" as a value will use the defaults for the context. | false |
cache |
Boolean Number |
Enable/Disable and/or set capacity of cached entries. The cache automatically balance stored entries related to their popularity. |
false |
fastupdate | Boolean | Additionally add a fastupdate index which boost any replace/update/remove task to a high performance level by also increasing index size by ~30%. | false |
priority | Number | Sets the task execution priority (1 low priority - 9 high priority) when using the async methods | 4 |
score | function(string) => number | Use a custom score function | |
keystore | Number | Increase available size for In-Memory-Index by additionally using uniform balanced registers (Keystore). You can apply values from 1 to 64. | false |
Persistent Options: | |||
db | StorageInterface | Pass an instance of a persistent adapter | |
commit | Boolean | When disabled any changes won't commit, instead it needs calling index.commit() manually to make modifications to the index (add, update, remove) persistent. |
true |
Option | Values | Description | Default |
limit | number | Sets the limit of results | 100 |
offset | number | Apply offset (skip items) | 0 |
resolution | number | Limit the resolution (score) of the results | |
suggest | Boolean | Enables Suggestions in results | false |
cache | Boolean | Use a Query Cache | false |
resolve | Boolean | When set to false , an instance of a Resolver is returned to apply further operations |
true |
Option | Description | Example | Memory Factor (n = length of term) |
"strict" "exact" "default" |
index the full term | foobar |
1 |
"forward" |
index term in forward direction (supports right-to-left by Index option rtl: true ) |
fo obarfoob ar |
n |
"reverse" "bidirectional" |
index term in both directions | fo obarfoob arfoob ar fo obar |
2n - 1 |
"tolerant" |
index the full term by also being tolerant against typos like swapped letters and missing letters | foobra foboar foobr fooba |
2(n - 2) + 2 |
"full" |
index every consecutive partial | fooba rf oob ar |
n * (n - 1) |
Option | Description | Charset Type | Compression Ratio |
Exact |
Bypass encoding and take exact input | Universal (multi-lang) | 0% |
Normalize Default |
Case in-sensitive encoding Charset normalization Letter deduplication |
Universal (multi-lang) | ~ 7% |
LatinBalance |
Case in-sensitive encoding Charset normalization Letter deduplication Phonetic basic transformation |
Latin | ~ 30% |
LatinAdvanced |
Case in-sensitive encoding Charset normalization Letter deduplication Phonetic advanced transformation |
Latin | ~ 45% |
LatinExtra |
Case in-sensitive encoding Charset normalization Letter deduplication Soundex-like transformation |
Latin | ~ 60% |
LatinSoundex |
Full Soundex transformation | Latin | ~ 70% |
function(str) => [str] |
Pass a custom encoding function to the Encoder |
Encoder: | Exact |
Normalize (Default) |
LatinBalance |
LatinAdvanced |
LatinExtra |
LatinSoundex |
---|---|---|---|---|---|---|
Index Size | 3.1 Mb | 1.9 Mb | 1.7 Mb | 1.6 Mb | 1.1 Mb | 0.7 Mb |
Struldbrugs | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
strũlldbrųĝgs | ✓ | ✓ | ✓ | ✓ | ✓ | |
strultbrooks | ✓ | ✓ | ✓ | ✓ | ||
shtruhldbrohkz | ✓ | ✓ | ✓ | |||
zdroltbrykz | ✓ | ✓ | ||||
struhlbrogger | ✓ |
Option | Values | Description | Default |
resolution | Number | Sets the scoring resolution for the context. | 3 |
depth |
false Number |
Enable/Disable context index and also sets the maximum initial distance of related terms. | 1 |
bidirectional | Boolean | If enabled the context direction (aka "context chain") can move bidirectional. You should ony disable this options when you need a more exact match with fewer results. | true |