{"id":13394149,"url":"https://github.com/nextapps-de/flexsearch","last_synced_at":"2025-05-12T16:18:54.082Z","repository":{"id":37381791,"uuid":"122835005","full_name":"nextapps-de/flexsearch","owner":"nextapps-de","description":"Next-Generation full-text search library for Browser and Node.js","archived":false,"fork":false,"pushed_at":"2025-05-12T06:41:16.000Z","size":6751,"stargazers_count":12923,"open_issues_count":8,"forks_count":503,"subscribers_count":98,"default_branch":"master","last_synced_at":"2025-05-12T16:18:51.057Z","etag":null,"topics":["elasticsearch","full-text-search","fulltext-search","fuzzy","fuzzy-search","javascript","javascript-library","nodejs","open-source","search","search-algorithm","search-engine","search-in-text","searching","searching-algorithms","web","web-worker"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nextapps-de.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["ts-thomas"],"open_collective":"flexsearch","liberapay":"ts-thomas","patreon":"user?u=96245532","custom":["https://www.paypal.com/donate/?hosted_button_id=GEVR88FC9BWRW","https://salt.bountysource.com/teams/ts-thomas"]}},"created_at":"2018-02-25T12:40:24.000Z","updated_at":"2025-05-12T11:44:45.000Z","dependencies_parsed_at":"2023-02-10T21:16:14.859Z","dependency_job_id":"59a66857-7523-4546-bd72-ed32e09987ed","html_url":"https://github.com/nextapps-de/flexsearch","commit_stats":{"total_commits":219,"total_committers":40,"mean_commits":5.475,"dds":"0.34246575342465757","last_synced_commit":"961c3ae84a87fb3af2a52047fd7c8adc8949b86d"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextapps-de%2Fflexsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextapps-de%2Fflexsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextapps-de%2Fflexsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextapps-de%2Fflexsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nextapps-de","download_url":"https://codeload.github.com/nextapps-de/flexsearch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253774593,"owners_count":21962199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elasticsearch","full-text-search","fulltext-search","fuzzy","fuzzy-search","javascript","javascript-library","nodejs","open-source","search","search-algorithm","search-engine","search-in-text","searching","searching-algorithms","web","web-worker"],"created_at":"2024-07-30T17:01:10.535Z","updated_at":"2025-05-12T16:18:54.071Z","avatar_url":"https://github.com/nextapps-de.png","language":"JavaScript","readme":"FlexSearch v0.8: [Overview and Migration Guide](doc/0.8.0.md)\n\n[\u003cimg src=\"https://devin.ai/assets/deepwiki-badge.png\" alt=\"Ask DeepWiki.com\" height=\"20\"/\u003e](https://deepwiki.com/nextapps-de/flexsearch)\n\n\u003ch2\u003e\u003c/h2\u003e\n\u003ch1\u003e\n    \u003cimg src=\"doc/flexsearch-logo-glass-animated.svg\" style=\"width: 580px; max-width: 100%\" alt=\"FlexSearch.js: Next-Generation full-text search library for Browser and Node.js\"\u003e\n    \u003cp\u003e\u003c/p\u003e\n\u003c/h1\u003e\n\u003ch3\u003eNext-Generation full-text search library for Browser and Node.js\u003c/h3\u003e\n\n\u003ca target=\"_blank\" href=\"https://www.npmjs.com/package/flexsearch\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/flexsearch.svg\"\u003e\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://github.com/nextapps-de/flexsearch/actions\"\u003e\u003cimg src=\"https://img.shields.io/badge/build-passing-brightgreen\"\u003e\u003c/a\u003e\n\u003cimg src=\"https://img.shields.io/badge/coverage-91%25-brightgreen\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/typed-75%25-yellow\"\u003e\u003c!--\u003ca target=\"_blank\" href=\"https://github.com/nextapps-de/flexsearch/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/nextapps-de/flexsearch.svg\"\u003e\u003c/a\u003e--\u003e\n\u003ca target=\"_blank\" href=\"https://github.com/nextapps-de/flexsearch/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/flexsearch.svg\"\u003e\u003c/a\u003e\n\n[Basic Start](#load-library) \u0026ensp;\u0026bull;\u0026ensp; \n[API Reference](#api-overview) \u0026ensp;\u0026bull;\u0026ensp;\n[Encoder](doc/encoder.md) \u0026ensp;\u0026bull;\u0026ensp;\n[Document Search](doc/document-search.md) \u0026ensp;\u0026bull;\u0026ensp;\n[Persistent Indexes](doc/persistent.md) \u0026ensp;\u0026bull;\u0026ensp;\n[Using Worker](doc/worker.md) \u0026ensp;\u0026bull;\u0026ensp;\n[Tag Search](doc/document-search.md#tag-search) \u0026ensp;\u0026bull;\u0026ensp;\n[Highlighting](doc/result-highlighting.md) \u0026ensp;\u0026bull;\u0026ensp;\n[Resolver](doc/resolver.md) \u0026ensp;\u0026bull;\u0026ensp;\n[Changelog](CHANGELOG.md)\n\n## Please Support this Project\n\nFlexSearch 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!\n\n\u003ca href=\"https://opencollective.com/flexsearch/donate\" target=\"_blank\" style=\"margin-right: 10px\"\u003e\u003cimg src=\"doc/opencollective.png\" height=\"32\" alt=\"Donate using Open Collective\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/sponsors/ts-thomas/\" target=\"_blank\" style=\"margin-right: 10px\"\u003e\u003cimg src=\"doc/github-sponsors.png\" height=\"32\" alt=\"Donate using Github Sponsors\"\u003e\u003c/a\u003e\n\u003ca href=\"https://liberapay.com/ts-thomas/donate\" target=\"_blank\" style=\"margin-right: 10px\"\u003e\u003cimg src=\"doc/liberapay.svg\" height=\"32\" alt=\"Donate using Liberapay\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.patreon.com/user?u=96245532\" target=\"_blank\" style=\"margin-right: 10px\"\u003e\u003cimg src=\"doc/patron.png\" height=\"32\" alt=\"Donate using Patreon\"\u003e\u003c/a\u003e\n\u003ca href=\"https://salt.bountysource.com/teams/ts-thomas\" target=\"_blank\" style=\"margin-right: 10px\"\u003e\u003cimg src=\"doc/bountysource.svg\" height=\"32\" alt=\"Donate using Bountysource\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.paypal.com/donate/?hosted_button_id=GEVR88FC9BWRW\" target=\"_blank\"\u003e\u003cimg src=\"doc/paypal.png\" height=\"32\" alt=\"Donate using PayPal\"\u003e\u003c/a\u003e\n\n### FlexSearch Sponsors\n\n\u003ca href=\"https://antithesis.com\" target=\"_blank\" style=\"display: inline-block\"\u003e\n    \u003ccenter\u003e\n        \u003cimg src=\"doc/antithesis_logo.svg\" width=\"200\" alt=\"Donate using Open Collective\"\u003e\u003cbr\u003e\n        Antithesis Operations LLC\n    \u003c/center\u003e\n\u003c/a\u003e\n\u003ch1\u003e\u003c/h1\u003e\n\nFlexSearch performs queries up to 1,000,000 times faster \u003ca href=\"https://nextapps-de.github.io/flexsearch/\" target=\"_blank\"\u003ecompared to other libraries\u003c/a\u003e by also providing \u003ca href=\"https://nextapps-de.github.io/flexsearch/match.html\" target=\"_blank\"\u003epowerful search capabilities\u003c/a\u003e like multi-field search (document search), phonetic transformations, partial matching, tag-search, result highlighting or suggestions.\n\nBigger workloads are scalable through workers to perform any updates or queries to the index in parallel through dedicated balanced threads.\n\nThe latest generation v0.8 introduce [Persistent Indexes](doc/persistent.md), 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.\n\nFlexSearch was nominated by the GitNation for the \"Best Technology of the Year\".\n\nSupported Platforms:\n- Browser\n- Node.js\n\nSupported Database:\n- InMemory (Default)\n- [IndexedDB (Browser)](doc/persistent-indexeddb.md)\n- [Redis](doc/persistent-redis.md)\n- [SQLite](doc/persistent-sqlite.md)\n- [Postgres](doc/persistent-postgres.md)\n- [MongoDB](doc/persistent-mongodb.md)\n- [Clickhouse](doc/persistent-clickhouse.md)\n\nSupported Charsets:\n- Latin\n- Chinese, Korean, Japanese (CJK)\n- Hindi\n- Arabic\n- Cyrillic\n- Greek and Coptic\n- Hebrew\n\nCommon Code Examples:\n\n- Node.js: [Module (ESM)](example/nodejs-esm)\n- Node.js: [CommonJS](example/nodejs-commonjs)\n- Browser: [Module (ESM)](example/browser-module)\n- Browser: [Legacy Script](example/browser-legacy)\n\nDemos:\n- \u003ca href=\"https://raw.githack.com/nextapps-de/flexsearch/master/demo/autocomplete.html\" target=\"_blank\"\u003eAuto-Complete\u003c/a\u003e\n\n\u003ca name=\"benchmark\"\u003e\u003c/a\u003e\nBenchmarks:\n- \u003ca href=\"https://nextapps-de.github.io/flexsearch/\" target=\"_blank\"\u003ePerformance Benchmark\u003c/a\u003e\n- \u003ca href=\"https://nextapps-de.github.io/flexsearch/match.html\" target=\"_blank\"\u003eMatching Benchmark\u003c/a\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eLatest Benchmark Results\u003c/summary\u003e\n\u003cbr\u003e\nThe benchmark was measured in terms per seconds, higher values are better (except the test \"Memory\").\nThe memory value refers to the amount of memory which was additionally allocated during search.\u003cbr\u003e\n\n\u003ctable\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003cth\u003eLibrary\u003c/th\u003e\n        \u003cth\u003eMemory\u003c/th\u003e\n        \u003cth\u003eQuery: Single\u003c/th\u003e\n        \u003cth\u003eQuery: Multi\u003c/th\u003e\n        \u003cth\u003eQuery: Large\u003c/th\u003e\n        \u003cth\u003eQuery: Not Found\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eflexsearch\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e16\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e50955718\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e11912730\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e13981110\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e51706499\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003ejsii\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e2188\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e13847\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e949559\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e1635959\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e3730307\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003ewade\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e980\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e60473\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e443214\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e419152\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e1239372\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003ejs-search\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e237\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e22982\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e383775\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e426609\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e994803\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eminisearch\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e4777\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e30589\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e191657\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e5849\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e304233\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eorama\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e5355\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e29445\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e170231\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e4454\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e225491\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eelasticlunr\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e3073\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e14326\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e48558\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e101206\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e95840\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003elunr\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e2443\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e11527\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e51476\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e88858\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e103386\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eufuzzy\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e13754\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e2799\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e7788\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e58544\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e9557\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003ebm25\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e33963\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e3903\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e4777\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e12657\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e12471\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003efuzzysearch\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e300147\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e148\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e229\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e455\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e276\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003efuse\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e247107\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e422\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e321\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e337\u003c/td\u003e\n        \u003ctd align=\"right\"\u003e329\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\nRun Comparison: \u003ca href=\"https://nextapps-de.github.io/flexsearch/\" target=\"_blank\"\u003ePerformance Benchmark \"Gulliver's Travels\"\u003c/a\u003e\n\n\u003c/details\u003e\n\nExtern Projects \u0026 Plugins:\n- React: https://github.com/angeloashmore/react-use-flexsearch\n- Vue: https://github.com/Noction/vue-use-flexsearch\n- Gatsby: https://www.gatsbyjs.org/packages/gatsby-plugin-flexsearch/\n- Nikola: https://plugins.getnikola.com/v8/flexsearch_plugin/\n\n## Table of contents\n\n\u003e [!TIP]\n\u003e Understanding those 3 elementary things about FlexSearch will improve your results significantly: [Tokenizer](#tokenizer-partial-match), [Encoder](doc/encoder.md) and [Suggestions](#suggestions)\n\n- [Load Library (Node.js, ESM, Legacy Browser)](#load-library)\n  - [Non-Module Bundles (ES5 Legacy)](#non-module-bundles-es5-legacy)\n  - [Module (ESM)](#module-esm)\n  - [Node.js](#nodejs)\n- [Basic Usage and Variants](#basic-usage-and-variants)\n  - [Index Options](#index-options)\n  - [Search Options](#search-options)\n- [Common Code Examples (Browser, Node.js)](#common-code-examples)\n- [API Overview](#api-overview)\n- [Presets](#presets)\n- [Context Search](#context-search)\n  - [Context Options](#context-options)\n- [Fast-Update Mode](#fast-update-mode)\n- [Suggestions](#suggestions)\n- [Document Search (Multi-Field Search)](doc/document-search.md)\n  - [Document Index Options](doc/document-search.md#document-options)\n  - [Document Descriptor](doc/document-search.md#the-document-descriptor)\n  - [Document Search Options](doc/document-search.md#document-search-options)\n  - [Multi-Tag Search](doc/document-search.md)\n  - [Result Highlighting](doc/result-highlighting.md)\n    - [Highlighting Options](doc/result-highlighting.md#highlighting-options)\n      - [Boundary Options](doc/result-highlighting.md#highlighting-boundary-options)\n      - [Ellipsis Options](doc/result-highlighting.md#highlighting-ellipsis-options)\n- [Phonetic Search (Fuzzy Search)](#fuzzy-search)\n- [Tokenizer (Partial Search)](#tokenizer-partial-match)\n- [Charset Collection](#charset-collection)\n- [Encoder](doc/encoder.md)\n  - [Encoder Options](doc/encoder.md#encoder-options)\n  - [Universal Charset Collection](doc/encoder.md)\n  - [Latin Charset Encoder Presets](doc/encoder.md)\n  - [Language Specific Preset](doc/encoder.md)\n  - [Custom Encoder](doc/encoder.md#custom-encoder)\n- [Async Non-Blocking Runtime Balancer](doc/async.md)\n- [Worker Indexes](doc/worker.md)\n  - [Worker Index Options](doc/worker.md#worker-index-options)\n- [Resolver (Complex Queries)](doc/resolver.md)\n  - [Resolver Options](doc/resolver.md)\n  - [Boolean Operations (and, or, xor, not)](doc/resolver.md)\n  - [Boost](doc/resolver.md)\n  - [Limit / Offset](doc/resolver.md)\n  - [Resolve](doc/resolver.md)\n- [Auto-Balanced Cache by Popularity/Last Query](#auto-balanced-cache-by-popularity)\n- [Export / Import Indexes](doc/export-import.md)\n  - [Fast-Boot Serialization](doc/export-import.md#fast-boot-serialization-for-server-side-rendering-php-python-ruby-rust-java-go-nodejs-)\n- [Persistent Indexes](doc/persistent.md)\n  - [Persistent Index Options](doc/persistent.md)\n  - [IndexedDB (Browser)](doc/persistent-indexeddb.md)\n  - [Postgres](doc/persistent-postgres.md)\n  - [Redis](doc/persistent-redis.md)\n  - [MongoDB](doc/persistent-mongodb.md)\n  - [SQLite](doc/persistent-sqlite.md)\n  - [Clickhouse](doc/persistent-clickhouse.md)\n- [Custom Score Function](doc/customization.md)\n- [Custom Builds](doc/custom-builds.md)\n- [Extended Keystores (In-Memory Index)](doc/keystore.md)\n- [Best Practices](#best-practices)\n  - [Page-Load / Fast-Boot](#page-load--fast-boot)\n  - [Prefer numeric typed IDs](#use-numeric-ids)\n\n## Load Library (Node.js, ESM, Legacy Browser)\n\n```bash\nnpm install flexsearch\n```\n\nThe **_dist_** folder is located in: `node_modules/flexsearch/dist/`\n\n\u003e 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](doc/custom-builds.md).\n\n\u003cdetails\u003e\n\u003csummary\u003eDownload Builds\u003c/summary\u003e\n\u003cbr\u003e\n\u003ctable\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eBuild\u003c/td\u003e\n        \u003ctd\u003eFile\u003c/td\u003e\n        \u003ctd\u003eCDN\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eflexsearch.bundle.min.js\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://github.com/nextapps-de/flexsearch/raw/0.8.1/dist/flexsearch.bundle.min.js\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.bundle.min.js\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.bundle.min.js\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eflexsearch.bundle.debug.js\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://github.com/nextapps-de/flexsearch/raw/0.8.1/dist/flexsearch.bundle.debug.js\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.bundle.debug.js\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.bundle.debug.js\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eflexsearch.bundle.module.min.js\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://github.com/nextapps-de/flexsearch/raw/0.8.1/dist/flexsearch.bundle.module.min.js\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.bundle.module.min.js\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.bundle.module.min.js\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eflexsearch.bundle.module.debug.js\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://github.com/nextapps-de/flexsearch/raw/0.8.1/dist/flexsearch.bundle.module.debug.js\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.bundle.module.debug.js\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.bundle.module.debug.js\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eflexsearch.compact.min.js\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://github.com/nextapps-de/flexsearch/raw/0.8.1/dist/flexsearch.compact.min.js\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.compact.min.js\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.compact.min.js\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eflexsearch.compact.debug.js\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://github.com/nextapps-de/flexsearch/raw/0.8.1/dist/flexsearch.compact.debug.js\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.compact.debug.js\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.compact.debug.js\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eflexsearch.compact.module.min.js\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://github.com/nextapps-de/flexsearch/raw/0.8.1/dist/flexsearch.compact.module.min.js\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.compact.module.min.js\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.compact.module.min.js\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eflexsearch.compact.module.debug.js\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://github.com/nextapps-de/flexsearch/raw/0.8.1/dist/flexsearch.compact.module.debug.js\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.compact.module.debug.js\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.compact.module.debug.js\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eflexsearch.light.min.js\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://github.com/nextapps-de/flexsearch/raw/0.8.1/dist/flexsearch.light.min.js\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.light.min.js\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.light.min.js\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e****\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eflexsearch.light.debug.js\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://github.com/nextapps-de/flexsearch/raw/0.8.1/dist/flexsearch.light.debug.js\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.light.debug.js\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.light.debug.js\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eflexsearch.light.module.min.js\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://github.com/nextapps-de/flexsearch/raw/0.8.1/dist/flexsearch.light.module.min.js\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.light.module.min.js\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.light.module.min.js\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eflexsearch.light.module.debug.js\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://github.com/nextapps-de/flexsearch/raw/0.8.1/dist/flexsearch.light.module.debug.js\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.light.module.debug.js\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.light.module.debug.js\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eflexsearch.es5.min.js\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://github.com/nextapps-de/flexsearch/raw/0.8.1/dist/flexsearch.es5.min.js\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.es5.min.js\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.es5.min.js\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eflexsearch.es5.debug.js\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://github.com/nextapps-de/flexsearch/raw/0.8.1/dist/flexsearch.es5.debug.js\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.es5.debug.js\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/flexsearch.es5.debug.js\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eJavascript Modules (ESM)\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2Fnextapps-de%2Fflexsearch%2Ftree%2F0.8.1%2Fdist%2Fmodule\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/module/\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/module/\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eJavascript Modules Minified (ESM)\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2Fnextapps-de%2Fflexsearch%2Ftree%2F0.8.1%2Fdist%2Fmodule-min\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/module-min/\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/module-min/\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eJavascript Modules Debug (ESM)\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2Fnextapps-de%2Fflexsearch%2Ftree%2F0.8.1%2Fdist%2Fmodule-debug\" target=\"_blank\"\u003eDownload\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003ca href=\"https://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/module-debug/\" target=\"_blank\"\u003ehttps://cdn.jsdelivr.net/gh/nextapps-de/flexsearch@0.8.1/dist/module-debug/\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eflexsearch.custom.js\u003c/td\u003e\n        \u003ctd colspan=\"2\"\u003e\u003ca href=\"/doc/custom-builds.md\"\u003eRead more about \"Custom Build\"\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c/details\u003e\n\u003ca name=\"bundles\"\u003e\u003c/a\u003e\n\u003cdetails\u003e\n\u003csummary\u003eCompare Bundles: Light, Compact, Bundle\u003c/summary\u003e\n\u003cbr\u003e\n\n\u003e The Node.js package includes all features.\n\n\u003ctable\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eFeature\u003c/td\u003e\n        \u003ctd\u003eflexsearch.bundle.js\u003c/td\u003e\n        \u003ctd\u003eflexsearch.compact.js\u003c/td\u003e\n        \u003ctd\u003eflexsearch.light.js\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003ca href=\"#presets\"\u003ePresets\u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003ca href=\"doc/async.md\"\u003eAsync Processing\u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e-\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003ca href=\"doc/worker.md\"\u003eWorkers (Web + Node.js)\u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e-\u003c/td\u003e\n        \u003ctd\u003e-\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003ca href=\"#context-search\"\u003eContext Search\u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003ca href=\"doc/document-search.md\"\u003eDocument Search\u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e-\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003ca href=\"doc/document-search.md#store\"\u003eDocument Datastore\u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e-\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003ca href=\"#tokenizer\"\u003ePartial Matching\u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003ca href=\"doc/cache.md\"\u003eAuto-Balanced Cache by Popularity/Last Queries\u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e-\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003ca href=\"doc/document-search.md#tag-search\"\u003eTag Search\u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e-\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003ca href=\"#suggestions\"\u003eSuggestions\u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003ca href=\"#fuzzy-search\"\u003ePhonetic Search (Fuzzy Search)\u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e-\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ca href=\"doc/encoder.md\"\u003eEncoder\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ca href=\"doc/export-import.md\"\u003eExport / Import Indexes\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e-\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ca href=\"doc/resolver.md\"\u003eResolver\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e-\u003c/td\u003e\n        \u003ctd\u003e-\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ca href=\"doc/result-highlighting.md\"\u003eResult Highlighting\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e-\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ca href=\"doc/persistent.md\"\u003ePersistent Index (IndexedDB)\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e-\u003c/td\u003e\n        \u003ctd\u003e-\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eFile Size (gzip)\u003c/td\u003e\n        \u003ctd\u003e16.3 kb\u003c/td\u003e\n        \u003ctd\u003e11.4 kb\u003c/td\u003e\n        \u003ctd\u003e4.5 kb\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c/details\u003e\n\n\u003e [!TIP]\n\u003e All debug versions are providing debug information through the console and gives you helpful advices on certain situations. Do not use them in production, since they are special builds containing extra debugging processes which noticeably reduce performance.\n\nThe abbreviations used at the end of the filenames indicates:\n\n- `bundle` All features included, FlexSearch is available on `window.FlexSearch`\n- `light` Only basic features are included, FlexSearch is available on `window.FlexSearch`\n- `es5` bundle has support for EcmaScript5, FlexSearch is available on `window.FlexSearch`\n- `module` indicates that this bundle is a Javascript module (ESM), FlexSearch members are available by `import { Index, Document, Worker, Encoder, Charset } from \"./flexsearch.bundle.module.min.js\"` or alternatively using the default export `import FlexSearch from \"./flexsearch.bundle.module.min.js\"`\n- `min` bundle is minified\n- `debug` bundle has enabled debug mode and contains additional code just for debugging purposes (do not use for production)\n\n## Load Library\n\n### Non-Module Bundles (ES5 Legacy)\n\n\u003e Non-Module Bundles export all their features to the public namespace \"FlexSearch\" e.g. `window.FlexSearch.Index` or `window.FlexSearch.Document`.\n\nLoad the bundle by a script tag:\n\n```html\n\u003cscript src=\"dist/flexsearch.bundle.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  // ... access FlexSearch\n  var Index = window.FlexSearch.Index;\n  var index = new Index(/* ... */);\n\u003c/script\u003e\n```\n\nFlexSearch Members are accessible on:\n```js\nvar Index = window.FlexSearch.Index;\nvar Document = window.FlexSearch.Document;\nvar Encoder = window.FlexSearch.Encoder;\nvar Charset = window.FlexSearch.Charset;\nvar Resolver = window.FlexSearch.Resolver;\nvar Worker = window.FlexSearch.Worker;\nvar IdxDB = window.FlexSearch.IndexedDB;\n// only exported by non-module builds:\nvar Language = window.FlexSearch.Language;\n```\n\nLoad language packs:\n\n```html\n\u003c!-- English: --\u003e\n\u003cscript src=\"dist/lang/en.min.js\"\u003e\u003c/script\u003e\n\u003c!-- German: --\u003e\n\u003cscript src=\"dist/lang/de.min.js\"\u003e\u003c/script\u003e\n\u003c!-- French: --\u003e\n\u003cscript src=\"dist/lang/fr.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  var EnglishEncoderPreset = window.FlexSearch.Language.en;\n  var GermanEncoderPreset = window.FlexSearch.Language.de;\n  var FrenchEncoderPreset = window.FlexSearch.Language.fr;\n\u003c/script\u003e\n```\n\n### Module (ESM)\n\nWhen using modules you can choose from 2 variants: `flexsearch.xxx.module.min.js` has all features bundled ready for production, whereas the folder `/dist/module/` export all the features in the same structure as the source code but here compiler flags was resolved.\n\nAlso, for each variant there exist:\n1. A debug version for the development\n2. A pre-compiled minified version for production\n\nUse the bundled version exported as a module (default export):\n\n```html\n\u003cscript type=\"module\"\u003e\n    import FlexSearch from \"./dist/flexsearch.bundle.module.min.js\";\n    const index = new FlexSearch.Index(/* ... */);\n\u003c/script\u003e\n```\n\nOr import FlexSearch members separately by:\n\n```html\n\u003cscript type=\"module\"\u003e\n    import { Index, Document, Encoder, Charset, Resolver, Worker, IndexedDB } \n        from \"./dist/flexsearch.bundle.module.min.js\";\n    const index = new Index(/* ... */);\n\u003c/script\u003e\n```\n\nUse bundled style on non-bundled modules:\n\n```html\n\u003cscript type=\"module\"\u003e\n    import { Index, Document, Encoder, Charset, Resolver, Worker, IndexedDB }\n        from \"./dist/module/bundle.js\";\n    const index = new Index(/* ... */);\n\u003c/script\u003e\n```\n\nUse non-bundled modules by file default exports:\n\n```html\n\u003cscript type=\"module\"\u003e\n    import Index from \"./dist/module/index.js\";\n    import Document from \"./dist/module/document.js\";\n    import Encoder from \"./dist/module/encoder.js\";\n    import Charset from \"./dist/module/charset.js\";\n    import Resolver from \"./dist/module/resolver.js\";\n    import Worker from \"./dist/module/worker.js\";\n    import IndexedDB from \"./dist/module/db/indexeddb/db.js\";\n    const index = new Index(/* ... */);\n\u003c/script\u003e\n```\n\nLanguage packs are accessible via:\n\n```js\nimport EnglishEncoderPreset from \"./dist/module/lang/en.js\";\nimport GermanEncoderPreset from \"./dist/module/lang/de.js\";\nimport FrenchEncoderPreset from \"./dist/module/lang/fr.js\";\n```\n\nAlso, pre-compiled non-bundled production-ready modules are located in `dist/module-min/`, whereas the debug version is located at `dist/module-debug/`.\n\nYou can also load modules via CDN:\n\n```html\n\u003cscript type=\"module\"\u003e\n    import Index from \"https://unpkg.com/flexsearch@0.8.1/dist/module/index.js\";\n    const index = new Index(/* ... */);\n\u003c/script\u003e\n```\n\n### Node.js\n\nInstall FlexSearch via NPM:\n\n```npm\nnpm install flexsearch\n```\n\nUse the default export:\n\n```js\nconst FlexSearch = require(\"flexsearch\");\nconst index = new FlexSearch.Index(/* ... */);\n```\n\nOr require FlexSearch members separately by:\n\n```js\nconst { Index, Document, Encoder, Charset, Resolver, Worker } = require(\"flexsearch\");\nconst index = new Index(/* ... */);\n```\n\nWhen using ESM instead of CommonJS:\n\n```js\nimport { Index, Document, Encoder, Charset, Resolver, Worker } from \"flexsearch\";\nconst index = new Index(/* ... */);\n```\n\nLanguage packs are accessible via:\n\n```js\nconst EnglishEncoderPreset = require(\"flexsearch/lang/en\");\nconst GermanEncoderPreset = require(\"flexsearch/lang/de\");\nconst FrenchEncoderPreset = require(\"flexsearch/lang/fr\");\n```\n\nPersistent Connectors are accessible via:\n\n```js\nconst Postgres = require(\"flexsearch/db/postgres\");\nconst Sqlite = require(\"flexsearch/db/sqlite\");\nconst MongoDB = require(\"flexsearch/db/mongodb\");\nconst Redis = require(\"flexsearch/db/redis\");\nconst Clickhouse = require(\"flexsearch/db/clickhouse\");\n```\n\n## Basic Usage and Variants\n\nThere are 3 types of indexes:\n\n1. `Index` is a flat high performance index which stores id-content-pairs.\n2. `Worker` / `WorkerIndex` is also a flat index which stores id-content-pairs but runs in background as a dedicated worker thread.\n3. `Document` is multi-field index which can store complex JSON documents (could also exist of worker indexes).\n\nThe most of you probably need just one of them according to your scenario. Any of these 3 index type are upgradable to persistent indexes.\n\nThe `worker` instance inherits from type `Index` and basically works like a standard FlexSearch Index. A document index is a complex register automatically operating on several of those standard indexes in parallel. Worker-Support in documents needs to be enabled by just passing the appropriate option during creation e.g. `{ worker: true }`.\n\n```js\nindex.add(id, text);\nconst result = index.search(text, options);\n```\n\n```js\ndocument.add(doc);\nconst result = document.search(text, options);\n```\n\n```js\nawait worker.add(id, text);\nconst result = await worker.search(text, options);\n```\n\n\u003e Every method called on a `Worker` index is treated as async. You will get back a `Promise` or you can provide a callback function as the last parameter alternatively.\n\n### Common Code Examples\n\nThe documentation will refer to several examples. A list of all examples:\n\n\u003ca name=\"examples-nodejs\"\u003e\u003c/a\u003e\n\u003cdetails\u003e\n\u003csummary\u003eExamples Node.js (CommonJS)\u003c/summary\u003e\u003cbr\u003e\n\n- [basic](example/nodejs-commonjs/basic)\n- [basic-suggestion](example/nodejs-commonjs/basic-suggestion)\n- [basic-persistent](example/nodejs-commonjs/basic-persistent)\n- [basic-resolver](example/nodejs-commonjs/basic-resolver)\n- [basic-worker](example/nodejs-commonjs/basic-worker)\n- [basic-worker-extern-config](example/nodejs-commonjs/basic-worker-extern-config)\n- [basic-worker-export-import](example/nodejs-commonjs/basic-worker-export-import)\n- [basic-export-import](example/nodejs-commonjs/basic-export-import)\n- [document](example/nodejs-commonjs/document)\n- [document-persistent](example/nodejs-commonjs/document-persistent)\n- [document-worker](example/nodejs-commonjs/document-worker)\n- [document-worker-extern-config](example/nodejs-commonjs/document-worker-extern-config)\n- [document-export-import](example/nodejs-commonjs/document-export-import)\n- [document-worker-export-import](example/nodejs-commonjs/document-worker-export-import)\n- [language-pack](example/nodejs-commonjs/language-pack)\n\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003eExamples Node.js (ESM/Module)\u003c/summary\u003e\u003cbr\u003e\n\n- [basic](example/nodejs-esm/basic)\n- [basic-suggestion](example/nodejs-esm/basic-suggestion)\n- [basic-persistent](example/nodejs-esm/basic-persistent)\n- [basic-resolver](example/nodejs-esm/basic-resolver)\n- [basic-worker](example/nodejs-esm/basic-worker)\n- [basic-worker-extern-config](example/nodejs-esm/basic-worker-extern-config)\n- [basic-worker-export-import](example/nodejs-esm/basic-worker-export-import)\n- [basic-export-import](example/nodejs-esm/basic-export-import)\n- [document](example/nodejs-esm/document)\n- [document-persistent](example/nodejs-esm/document-persistent)\n- [document-worker](example/nodejs-esm/document-worker)\n- [document-worker-extern-config](example/nodejs-esm/document-worker-extern-config)\n- [document-export-import](example/nodejs-esm/document-export-import)\n- [document-worker-export-import](example/nodejs-esm/document-worker-export-import)\n- [language-pack](example/nodejs-esm/language-pack)s\n\n\u003c/details\u003e\n\n\u003ca name=\"examples-browser\"\u003e\u003c/a\u003e\n\u003cdetails\u003e\n\u003csummary\u003eExamples Browser (Legacy)\u003c/summary\u003e\u003cbr\u003e\n\n- [basic](example/browser-legacy/basic)\n- [basic-suggestion](example/browser-legacy/basic-suggestion)\n- [basic-persistent](example/browser-legacy/basic-persistent)\n- [basic-resolver](example/browser-legacy/basic-resolver)\n- [basic-worker](example/browser-legacy/basic-worker)\n- [document](example/browser-legacy/document)\n- [document-highlighting](example/browser-legacy/document-highlighting)\n- [document-persistent](example/browser-legacy/document-persistent)\n- [document-worker](example/browser-legacy/document-worker)\n- [language-pack](example/browser-legacy/language-pack)\n\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003eExamples Browser (ESM/Module)\u003c/summary\u003e\u003cbr\u003e\n\n- [basic](example/browser-module/basic)\n- [basic-suggestion](example/browser-module/basic-suggestion)\n- [basic-persistent](example/browser-module/basic-persistent)\n- [basic-resolver](example/browser-module/basic-resolver)\n- [basic-worker](example/browser-module/basic-worker)\n- [basic-worker-extern-config](example/browser-module/basic-worker-extern-config)\n- [document](example/browser-module/document)\n- [document-highlighting](example/browser-module/document-highlighting)\n- [document-persistent](example/browser-module/document-persistent)\n- [document-worker](example/browser-module/document-worker)\n- [document-worker-extern-config](example/browser-module/document-worker-extern-config)\n- [language-pack](example/browser-module/language-pack)\n  \n\u003c/details\u003e\n\n## API Overview\n\nConstructors:\n\n- new [**Index**](#basic-usage)(\\\u003coptions\\\u003e) : \u003csmall\u003e_index_\u003c/small\u003e\n- new [**Document**](doc/document-search.md)(options) : \u003csmall\u003e_document_\u003c/small\u003e\n- new [**Worker**](doc/worker.md)(\\\u003coptions\\\u003e) : \u003csmall\u003e_worker_\u003c/small\u003e\n- new [**Encoder**](doc/encoder.md)(\\\u003coptions\\\u003e, \\\u003coptions\\\u003e, ...) : \u003csmall\u003e_encoder_\u003c/small\u003e\n- new [**Resolver**](doc/resolver.md)(\\\u003coptions\\\u003e) : \u003csmall\u003e_resolver_\u003c/small\u003e\n- new [**IndexedDB**](doc/persistent-indexeddb.md)(\\\u003coptions\\\u003e) : \u003csmall\u003e_indexeddb_\u003c/small\u003e\n\n---\n\nGlobal Members:\n\n- [**Charset**](#charset-collection)\n- [**Language**](doc/encoder.md#built-in-language-packs) (Legacy Browser Only)\n\n---\n\n`Index` / `Worker`-Index Methods:\n\n- index.[**add**](#add-text-item-to-an-index)(id, string)\n- ~~index.[**append**]()(id, string)~~\n- index.[**update**](#update-item-from-an-index)(id, string)\n- index.[**remove**](#remove-item-from-an-index)(id)\n- index.[**search**](#search-items)(string, \\\u003climit\\\u003e, \\\u003coptions\\\u003e)\n- index.[**search**](#search-items)(options)\n- index.[**searchCache**](#auto-balanced-cache-by-popularity)(...)\n- index.[**contain**](#check-existence-of-already-indexed-ids)(id)\n- index.[**clear**](#clear-all-items-from-an-index)()\n- index.[**cleanup**](#fast-update-mode)()\n\n##\n\n- \u003csmall\u003e_async_\u003c/small\u003e index.[**export**](doc/export-import.md)(handler)\n- \u003csmall\u003e_async_\u003c/small\u003e index.[**import**](doc/export-import.md)(key, data)\n- \u003csmall\u003e_async_\u003c/small\u003e index.[**serialize**](doc/export-import.md#fast-boot-serialization-for-server-side-rendering-php-python-ruby-rust-java-go-nodejs-)(boolean)\n\n##\n\n- \u003csmall\u003e_async_\u003c/small\u003e index.[**mount**](doc/persistent.md)(db)\n- \u003csmall\u003e_async_\u003c/small\u003e index.[**commit**](doc/persistent.md)(boolean)\n- \u003csmall\u003e_async_\u003c/small\u003e index.[**destroy**](doc/persistent.md#delete-store--migration)()\n\n---\n\n`Document` Methods:\n\n- document.[**add**](doc/document-search.md#addupdateremove-documents)(\\\u003cid\\\u003e, document)\n- ~~document.[**append**]()(\\\u003cid\\\u003e, document)~~\n- document.[**update**](doc/document-search.md#addupdateremove-documents)(\\\u003cid\\\u003e, document)\n- document.[**remove**](doc/document-search.md#addupdateremove-documents)(id)\n- document.[**remove**](doc/document-search.md#addupdateremove-documents)(document)\n- document.[**search**](doc/document-search.md#document-search-field-search)(string, \\\u003climit\\\u003e, \\\u003coptions\\\u003e)\n- document.[**search**](doc/document-search.md#document-search-field-search)(options)\n- document.[**searchCache**](#auto-balanced-cache-by-popularity)(...)\n- document.[**contain**](doc/document-search.md)(id)\n- document.[**clear**](doc/document-search.md)()\n- document.[**cleanup**](#fast-update-mode)()\n- document.[**get**](doc/document-search.md#document-store)(id)\n- document.[**set**](doc/document-search.md#document-store)(\\\u003cid\\\u003e, document)\n\n##\n\n- \u003csmall\u003e_async_\u003c/small\u003e document.[**export**](doc/export-import.md)(handler)\n- \u003csmall\u003e_async_\u003c/small\u003e document.[**import**](doc/export-import.md)(key, data)\n\n##\n\n- \u003csmall\u003e_async_\u003c/small\u003e document.[**mount**](doc/persistent.md)(db)\n- \u003csmall\u003e_async_\u003c/small\u003e document.[**commit**](doc/persistent.md)(boolean)\n- \u003csmall\u003e_async_\u003c/small\u003e document.[**destroy**](doc/persistent.md#delete-store--migration)()\n\n`Document` Properties:\n\n- document.[**store**](doc/document-search.md#document-store)\n\n---\n\nAsync Equivalents (Non-Blocking Balanced):\n\n- \u003csmall\u003e_async_\u003c/small\u003e [**.addAsync**](doc/async.md)( ... , \\\u003ccallback\\\u003e)\n- \u003csmall\u003e_async_\u003c/small\u003e ~~[**.appendAsync**](doc/async.md)( ... , \\\u003ccallback\\\u003e)~~\n- \u003csmall\u003e_async_\u003c/small\u003e [**.updateAsync**](doc/async.md)( ... , \\\u003ccallback\\\u003e)\n- \u003csmall\u003e_async_\u003c/small\u003e [**.removeAsync**](doc/async.md)( ... , \\\u003ccallback\\\u003e)\n- \u003csmall\u003e_async_\u003c/small\u003e [**.searchAsync**](doc/async.md)( ... , \\\u003ccallback\\\u003e)\n\nAsync methods will return a `Promise`, additionally you can pass a callback function as the last parameter.\n\nMethods `.export()` and also `.import()` are always async as well as every method you call on a `Worker`-based or `Persistent` Index.\n\n---\n\n`Encoder` Methods:\n\n- encoder.[**encode**](doc/encoder.md)(string)\n- encoder.[**assign**](doc/encoder.md)(options, \\\u003coptions\\\u003e, ...)\n- encoder.[**addFilter**](doc/encoder.md#add-language-specific-stemmer-andor-filter)(string)\n- encoder.[**addStemmer**](doc/encoder.md#add-language-specific-stemmer-andor-filter)(string =\u003e boolean)\n- encoder.[**addMapper**](doc/encoder.md)(char, char)\n- encoder.[**addMatcher**](doc/encoder.md)(string, string)\n- encoder.[**addReplacer**](doc/encoder.md)(regex, string)\n\n---\n\n`Resolver` Methods:\n\n- resolver.[**and**](doc/resolver.md)(options)\n- resolver.[**or**](doc/resolver.md)(options)\n- resolver.[**xor**](doc/resolver.md)(options)\n- resolver.[**not**](doc/resolver.md)(options)\n- resolver.[**boost**](doc/resolver.md)(number)\n- resolver.[**limit**](doc/resolver.md)(number)\n- resolver.[**offset**](doc/resolver.md)(number)\n- resolver.[**resolve**](doc/resolver.md)(\\\u003coptions\\\u003e)\n\n`Resolver` Properties:\n\n- resolver.[**result**](doc/resolver.md)\n\n---\n\n`StorageInterface` Methods:\n\n- \u003csmall\u003e_async_\u003c/small\u003e db.[**mount**](doc/persistent.md)(index, \\\u003coptions\\\u003e)\n- \u003csmall\u003e_async_\u003c/small\u003e db.[**open**](doc/persistent.md)()\n- \u003csmall\u003e_async_\u003c/small\u003e db.[**close**](doc/persistent.md)()\n- \u003csmall\u003e_async_\u003c/small\u003e db.[**destroy**](doc/persistent.md)()\n- \u003csmall\u003e_async_\u003c/small\u003e db.[**clear**](doc/persistent.md)()\n\n---\n\n`Charset` Universal Encoder Preset:\n\n- Charset.[**Exact**](#charset-collection)\n- Charset.[**Default**](#charset-collection)\n- Charset.[**Normalize**](#charset-collection)\n\n`Charset` Latin-specific Encoder Preset:\n\n- Charset.[**LatinBalance**](#charset-collection)\n- Charset.[**LatinAdvanced**](#charset-collection)\n- Charset.[**LatinExtra**](#charset-collection)\n- Charset.[**LatinSoundex**](#charset-collection)\n\n`Charset` Chinese, Japanese, Korean Encoder Preset:\n\n- Charset.[**CJK**](#charset-collection)\n\n---\n\n`Language` Encoder Preset:\n- [**en**](doc/encoder.md#built-in-language-packs)\n- [**de**](doc/encoder.md#built-in-language-packs)\n- [**fr**](doc/encoder.md#built-in-language-packs)\n\n## Basic Usage\n\n#### Create a new index\n\n```js\nconst index = new Index();\n```\n\nCreate a new index and choosing one of the [Presets](#presets):\n\n```js\nconst index = new Index(\"match\");\n```\n\nCreate a new index with custom options:\n\n```js\nconst index = new Index({\n    tokenize: \"forward\"\n});\n```\n\nCreate a new index and extend a preset with custom options:\n\n```js\nvar index = new FlexSearch({\n    preset: \"memory\",\n    tokenize: \"forward\",\n    resolution: 5\n});\n```\n\nCreate a new index and assign an [Encoder](doc/encoder.md):\n\n```js\nimport { Charset } from \"flexsearch\";\nconst index = new Index({\n    tokenize: \"forward\",\n    encoder: Charset.LatinBalance\n});\n```\n\nRelated Topics: [Index Options](#index-options) \n\u0026ensp;\u0026bull;\u0026ensp; [Resolution](#resolution)\n\u0026ensp;\u0026bull;\u0026ensp; [Charset Collection](#charset-collection)\n\u0026ensp;\u0026bull;\u0026ensp; [Tokenizer](#tokenizer-partial-match)\n\n#### Add text item to an index\n\nEvery content which should be added to the index needs an ID. When your content has no ID, then you need to create one by passing an index or count or something else as an ID (a value from type `number` is highly recommended). Those IDs are unique references to a given content. This is important when you update or adding over content through existing IDs. When referencing is not a concern, you can simply use something simple like `count++`.\n\n\u003e Index.__add(id, string)__\n\n```js\nindex.add(0, \"John Doe\");\n```\n\n#### Search items\n\n\u003e Index.__search(string | options, \\\u003climit\\\u003e, \\\u003coptions\\\u003e)__\n\n```js\nindex.search(\"John\");\n```\n\nLimit the result:\n\n```js\nindex.search(\"John\", 10);\n```\n\n#### Check existence of already indexed IDs\n\nYou can check if an ID was already indexed by:\n\n```js\nif(index.contain(1)){\n    console.log(\"ID was found in index\");\n}\n```\n\n#### Update item from an index\n\n\u003e Index.__update(id, string)__\n\n```js\nindex.update(0, \"Max Miller\");\n```\n\n#### Remove item from an index\n\n\u003e Index.__remove(id)__\n\n```js\nindex.remove(0);\n```\n\n#### Clear all items from an index\n\n\u003e Index.__clear()__\n\n```js\nindex.clear();\n```\n\n### Chaining\n\nSimply chain methods like:\n\n```js\nconst index = new Index().addMatcher({'â': 'a'}).add(0, 'foo').add(1, 'bar');\n```\n\n```js\nindex.remove(0).update(1, 'foo').add(2, 'foobar');\n```\n\n## Index Options\n\n\u003ctable\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eOption\u003c/td\u003e\n        \u003ctd\u003eValues\u003c/td\u003e\n        \u003ctd\u003eDescription\u003c/td\u003e\n        \u003ctd\u003eDefault\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003epreset\u003c/td\u003e\n        \u003ctd\u003e\n            \"memory\"\u003cbr\u003e\n            \"performance\"\u003cbr\u003e\n            \"match\"\u003cbr\u003e\n            \"score\"\u003cbr\u003e\n            \"default\"\n        \u003c/td\u003e\n        \u003ctd\u003e\n            The \u003ca href=\"#presets\"\u003econfiguration profile\u003c/a\u003e as a shortcut or as a base for your custom settings.\u003cbr\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\"default\"\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003etokenize\u003c/td\u003e\n        \u003ctd\u003e\n            \"strict\" / \"exact\"\u003cbr\u003e\n            \"forward\"\u003cbr\u003e\n            \"reverse\" / \"bidirectional\u003cbr\u003e\n            \"full\"\n        \u003c/td\u003e\n        \u003ctd\u003e\n            Indicates how terms should be indexed by \u003ca href=\"#tokenizer-partial-match\"\u003etokenization\u003c/a\u003e.\n        \u003c/td\u003e\n        \u003ctd\u003e\"strict\"\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eresolution\u003c/td\u003e\n        \u003ctd\u003e\n            Number\n        \u003c/td\u003e\n        \u003ctd\u003eSets the scoring \u003ca href=\"#resolution\"\u003eresolution\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e9\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eencoder\u003c/td\u003e\n        \u003ctd\u003e\n            \u003ca href=\"doc/encoder.md\"\u003enew Encoder(options)\u003c/a\u003e\u003cbr\u003e\n            Charset.Exact\u003cbr\u003e\n            Charset.Default\u003cbr\u003e\n            Charset.Normalize\u003cbr\u003e\n            Charset.LatinBalance\u003cbr\u003e\n            Charset.LatinAdvanced\u003cbr\u003e\n            Charset.LatinExtra\u003cbr\u003e\n            Charset.LatinSoundex\u003cbr\u003e\n            Charset.CJK\u003cbr\u003e\n            false\n        \u003c/td\u003e\n        \u003ctd\u003eChoose one of the \u003ca href=\"#charset-collection\"\u003ebuilt-in encoder\u003c/a\u003e\u003cbr\u003eRead more about \u003ca href=\"doc/encoder.md\"\u003eEncoder\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\"default\"\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eencode\u003c/td\u003e\n        \u003ctd\u003e\n            function(string) =\u003e string[]\n        \u003c/td\u003e\n        \u003ctd\u003ePass a \u003ca href=\"doc/encoder.md#custom-encoder\"\u003ecustom encoding function\u003c/a\u003e\u003cbr\u003eRead more about \u003ca href=\"doc/encoder.md\"\u003eEncoder\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\"default\"\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003econtext\u003c/td\u003e\n        \u003ctd\u003e\n            Boolean\u003cbr\u003e\n            \u003ca href=\"#context-options\"\u003eContext Options\u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd\u003eEnable/Disable \u003ca href=\"#context-search\"\u003econtext index\u003c/a\u003e. When passing \"true\" as a value will use the defaults for the context.\u003c/td\u003e\n        \u003ctd\u003efalse\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003ecache\u003c/td\u003e\n        \u003ctd\u003e\n            Boolean\u003cbr\u003e\n            Number\n        \u003c/td\u003e\n        \u003ctd\u003eEnable/Disable and/or set capacity of cached entries.\u003cbr\u003e\u003cbr\u003eThe cache automatically balance stored entries related to their popularity.\u003c/td\u003e\n        \u003ctd\u003efalse\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003efastupdate\u003c/td\u003e\n        \u003ctd\u003e\n            Boolean\n        \u003c/td\u003e\n        \u003ctd\u003eAdditionally add a \u003ca href=\"#fastupdate\"\u003efastupdate index\u003c/a\u003e which boost any replace/update/remove task to a high performance level by also increasing index size by ~30%.\u003c/td\u003e\n        \u003ctd\u003efalse\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003epriority\u003c/td\u003e\n        \u003ctd\u003e\n            Number\n        \u003c/td\u003e\n        \u003ctd\u003eSets the task execution priority (1 low priority - 9 high priority) when using the \u003ca href=\"doc/async.md\"\u003easync methods\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e4\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003escore\u003c/td\u003e\n        \u003ctd\u003e\n            function(string) =\u003e number\n        \u003c/td\u003e\n        \u003ctd\u003eUse a \u003ca href=\"doc/customization.md\"\u003ecustom score function\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003ekeystore\u003c/td\u003e\n        \u003ctd\u003e\n            Number\n        \u003c/td\u003e\n        \u003ctd\u003eIncrease available size for In-Memory-Index by additionally using uniform balanced registers (\u003ca href=\"doc/keystore.md\"\u003eKeystore\u003c/a\u003e). You can apply values from 1 to 64.\u003c/td\u003e\n        \u003ctd\u003efalse\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd colspan=\"4\"\u003e\n            Persistent Options:\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003edb\u003c/td\u003e\n        \u003ctd\u003e\n            StorageInterface\n        \u003c/td\u003e\n        \u003ctd\u003ePass an instance of a \u003ca href=\"doc/persistent.md\"\u003epersistent adapter\u003c/a\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003ecommit\u003c/td\u003e\n        \u003ctd\u003e\n            Boolean\n        \u003c/td\u003e\n        \u003ctd\u003eWhen disabled any changes won't commit, instead it needs calling \u003ccode\u003eindex.commit()\u003c/code\u003e manually to make modifications to the index (add, update, remove) persistent.\u003c/td\u003e\n        \u003ctd\u003etrue\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n## Search Options\n\n\u003ctable\u003e\n    \u003ctr\u003e\u003ctd colspan=\"4\"\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eOption\u003c/td\u003e\n        \u003ctd\u003eValues\u003c/td\u003e\n        \u003ctd\u003eDescription\u003c/td\u003e\n        \u003ctd\u003eDefault\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003elimit\u003c/td\u003e\n        \u003ctd\u003enumber\u003c/td\u003e\n        \u003ctd\u003eSets the limit of results.\u003c/td\u003e\n        \u003ctd\u003e100\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eoffset\u003c/td\u003e\n        \u003ctd\u003enumber\u003c/td\u003e\n        \u003ctd\u003eApply offset (skip items).\u003c/td\u003e\n        \u003ctd\u003e0\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003esuggest\u003c/td\u003e\n        \u003ctd\u003eBoolean\u003c/td\u003e\n        \u003ctd\u003eEnables \u003ca href=\"#suggestions\"\u003esuggestions\u003c/a\u003e in results.\u003c/td\u003e\n        \u003ctd\u003efalse\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n## Suggestions\n\nAny query on each of the index types is supporting the option `suggest: true`. Also within some of the `Resolver` stages (and, not, xor) you can add this option for the same purpose.\n\nWhen suggestions is enabled, it allows results which does not perfectly match to the given query e.g. when one term was not included. Suggestion-Search will keep track of the scoring, therefore the first result entry is the closest one to a perfect match.\n\n```js\nconst index = new Index().add(1, \"cat dog bird\");\nconst result = index.search(\"cat fish\");\n// result =\u003e []\n```\n\nSame query with suggestion enabled:\n\n```js\nconst result = index.search(\"cat fish\", { suggest: true });\n// result =\u003e [ 1 ]\n```\n\nAt least one match (or partial match) has to be found to get back any result:\n\n```js\nconst result = index.search(\"horse fish\", { suggest: true });\n// result =\u003e []\n```\n\n## Resolution\n\nThe resolution refers to the maximum count of scoring slots on which the content is divided into.\n\n\u003e A formula to determine a well-balanced value for the `resolution` is: $2*floor(\\sqrt{content.length})$ where content is the largest value pushed by `index.add()`. This formula does not apply to the `context` resolution.\n\nA resolution of 1 will disable scoring, when `context` was not enabled.\nA suggested minimum meaningful resolution is 3, because the first and last slot are reserved when available.\n\n### Context Resolution\n\nWhen `context` was enabled the minimum valuable resolution is 1.\nYou can adjust the resolution of the context index independently.\nGiving both a value of 1 will disable scoring by term position related to the document root.\nInstead, the scoring refers to the distance between each term within the query.\n\nAlthough using a resolution \u003e 1 can further improve context scoring. The default resolution still matters when context chain breaks and falls back to default index internally. A context resolution higher than 50% of the default resolution is probably too much.\n\n## Tokenizer (Partial Match)\n\nThe tokenizer is one of the most important options and heavily influence:\n\n1. required memory / storage\n2. capabilities of partial matches\n\n\u003e [!TIP]\n\u003e If you want getting back results of an indexed term \"flexsearch\" when just typing \"flex\" or \"search\" then this is done by choosing a tokenizer.\n\nTry to choose the most upper of these tokenizer which covers your requirements:\n\n\u003ctable\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eOption\u003c/td\u003e\n        \u003ctd\u003eDescription\u003c/td\u003e\n        \u003ctd\u003eExample\u003c/td\u003e\n        \u003ctd\u003eMemory Factor (n = length of term)\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003e\"strict\"\u003c/code\u003e\u003cbr\u003e\u003ccode\u003e\"exact\"\u003c/code\u003e\u003cbr\u003e\u003ccode\u003e\"default\"\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eindex the full term\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003efoobar\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e1\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003e\"forward\"\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eindex term in forward direction (supports right-to-left by Index option \u003ccode\u003ertl: true\u003c/code\u003e)\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003efo\u003c/code\u003eobar\u003cbr\u003e\u003ccode\u003efoob\u003c/code\u003ear\u003cbr\u003e\u003c/td\u003e\n        \u003ctd\u003en\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003e\"reverse\"\u003c/code\u003e\u003cbr\u003e\u003ccode\u003e\"bidirectional\"\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eindex term in both directions\u003c/td\u003e\n        \u003ctd\u003e\u003ccode\u003efo\u003c/code\u003eobar\u003cbr\u003e\u003ccode\u003efoob\u003c/code\u003ear\u003cbr\u003efoob\u003ccode\u003ear\u003c/code\u003e\u003cbr\u003efo\u003ccode\u003eobar\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e2n - 1\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003e\"full\"\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eindex every consecutive partial\u003c/td\u003e\n        \u003ctd\u003efo\u003ccode\u003eoba\u003c/code\u003er\u003cbr\u003ef\u003ccode\u003eoob\u003c/code\u003ear\u003c/td\u003e\n        \u003ctd\u003en * (n - 1)\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n## Charset Collection\n\nEncoding is one of the most important task and heavily influence:\n\n1. required memory / storage\n2. capabilities of phonetic matches (Fuzzy-Search)\n\n\u003ctable\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eOption\u003c/td\u003e\n        \u003ctd\u003eDescription\u003c/td\u003e\n        \u003ctd\u003eCharset Type\u003c/td\u003e\n        \u003ctd\u003eCompression Ratio\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003eExact\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eBypass encoding and take exact input\u003c/td\u003e\n        \u003ctd\u003eUniversal (multi-lang)\u003c/td\u003e\n        \u003ctd\u003e0%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003eNormalize\u003c/code\u003e\u003cbr\u003e\u003ccode\u003eDefault\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eCase in-sensitive encoding\u003cbr\u003eCharset normalization\u003cbr\u003eLetter deduplication\u003c/td\u003e\n        \u003ctd\u003eUniversal (multi-lang)\u003c/td\u003e\n        \u003ctd\u003e~ 7%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003eLatinBalance\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eCase in-sensitive encoding\u003cbr\u003eCharset normalization\u003cbr\u003eLetter deduplication\u003cbr\u003ePhonetic basic transformation\u003c/td\u003e\n        \u003ctd\u003eLatin\u003c/td\u003e\n        \u003ctd\u003e~ 30%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003eLatinAdvanced\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eCase in-sensitive encoding\u003cbr\u003eCharset normalization\u003cbr\u003eLetter deduplication\u003cbr\u003ePhonetic advanced transformation\u003c/td\u003e\n        \u003ctd\u003eLatin\u003c/td\u003e\n        \u003ctd\u003e~ 45%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003eLatinExtra\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eCase in-sensitive encoding\u003cbr\u003eCharset normalization\u003cbr\u003eLetter deduplication\u003cbr\u003eSoundex-like transformation\u003c/td\u003e\n        \u003ctd\u003eLatin\u003c/td\u003e\n        \u003ctd\u003e~ 60%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003eLatinSoundex\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eFull Soundex transformation\u003c/td\u003e\n        \u003ctd\u003eLatin\u003c/td\u003e\n        \u003ctd\u003e~ 70%\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003efunction(str) =\u003e [str]\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003ePass a custom encoding function to the \u003ccode\u003eEncoder\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n## Fuzzy-Search\n\nFlexSearch provides several methods to achieve fuzziness to make queries more tolerant:\n\n1. Use a tokenizer: `forward`, `reverse` or `full`\n2. Don't forget to use any of the builtin encoder `simple` \u003e `balance` \u003e `advanced` \u003e `extra` \u003e `soundex` (sorted by fuzziness)\n3. Use one of the language specific presets e.g. `/lang/en.js` for en-US specific content\n4. Enable suggestions by passing the search option `suggest: true`\n\nAdditionally, you can apply custom `Mapper`, `Replacer`, `Stemmer`, `Filter` or by assigning a custom `normalize(str)`, `prepare(str)` or `finalize(arr)` function to the Encoder.\n\n### Compare Built-In Encoder Preset\n\nOriginal term which was indexed: \"Struldbrugs\"\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003cth align=\"left\"\u003eEncoder:\u003c/th\u003e\n        \u003cth\u003e\u003ccode\u003eExact\u003c/code\u003e\u003c/th\u003e\n        \u003cth\u003e\u003ccode\u003eNormalize (Default)\u003c/code\u003e\u003c/th\u003e\n        \u003cth\u003e\u003ccode\u003eLatinBalance\u003c/code\u003e\u003c/th\u003e\n        \u003cth\u003e\u003ccode\u003eLatinAdvanced\u003c/code\u003e\u003c/th\u003e\n        \u003cth\u003e\u003ccode\u003eLatinExtra\u003c/code\u003e\u003c/th\u003e\n        \u003cth\u003e\u003ccode\u003eLatinSoundex\u003c/code\u003e\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003cth align=\"left\"\u003eIndex Size\u003c/th\u003e\n        \u003cth\u003e3.1 Mb\u003c/th\u003e\n        \u003cth\u003e1.9 Mb\u003c/th\u003e\n        \u003cth\u003e1.7 Mb\u003c/th\u003e\n        \u003cth\u003e1.6 Mb\u003c/th\u003e\n        \u003cth\u003e1.1 Mb\u003c/th\u003e\n        \u003cth\u003e0.7 Mb\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd align=\"left\"\u003eStruldbrugs\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd align=\"left\"\u003estrũlldbrųĝgs\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd align=\"left\"\u003estrultbrooks\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd align=\"left\"\u003eshtruhldbrohkz\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd align=\"left\"\u003ezdroltbrykz\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd align=\"left\"\u003estruhlbrogger\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e✓\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\nThe index size was measured after indexing the book \"Gulliver's Travels\".\n\n## Fast-Update Mode\n\nThe default mode is highly optimized for search performance and adding contents to the index. Whenever you need to `update` or `remove` existing contents of an index you can enable an additional register which boost those tasks also to a high-performance level. This register will take an extra amount of memory (~30% increase of index size).\n\n```js\nconst index = new Index({\n  fastupdate: true\n});\n```\n```js\nconst index = new Document({\n  fastupdate: true\n});\n```\n\n\u003e `Persistent`-Index does not support the `fastupdate` option, because of its nature.\n\nWhen using `fastupdate: true`, the index won't fully clear up, when removing items. A barely rest of structure will still remain. It's not a memory issue, because this rest will take less than 1% of the index size. But instead the internal performance of key lookups will lose efficiency, because of not used (empty) keys in the index.\n\nIn most cases this is not an issue. But you can trigger a `index.cleanup()` task, which will find those empty index slots and remove them:\n\n```js\nindex.cleanup();\n```\n\n\u003e The `cleanup` method has no effect when not using `fastupdate: true`.\n\n## Context Search\n\nThe basic idea of this concept is to limit relevance by its context instead of calculating relevance through the whole distance of its corresponding document. The context acts like a bidirectional moving window of 2 pointers (terms) which can initially have a maximum distance of the value passed via option setting `depth` and dynamically growth on search when the query did not match any results.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"doc/context-index.svg\" width=\"100%\"\u003e\n\u003c/p\u003e\n\n### Enable Context-Search\n\nCreate an index and use the default context:\n```js\nvar index = new FlexSearch({\n    tokenize: \"strict\",\n    context: true\n});\n```\n\nCreate an index and apply custom options for the context:\n```js\nvar index = new FlexSearch({\n    tokenize: \"strict\",\n    context: { \n        resolution: 5,\n        depth: 3,\n        bidirectional: true\n    }\n});\n```\n\n\u003e Only the tokenizer `strict` is actually supported by the context index.\n\n\u003e The context index requires \u003ca href=\"#memory\"\u003eadditional amount of memory\u003c/a\u003e depending on passed property `depth`.\n\n### Compare Context Search\n\nPay attention to the numbers \"1\", \"2\" and \"3\":\n\n```js\nconst index = new Index();\nindex.add(1, \"1 A B C D 2 E F G H I 3 J K L\");\nindex.add(2, \"A B C D E F G H I J 1 2 3 K L\");\nconst result = index.search(\"1 2 3\");\n// --\u003e [1, 2]\n```\n\nSame example with context enabled:\n\n```js\nconst index = new Index({ context: true });\nindex.add(1, \"1 A B C D 2 E F G H I 3 J K L\");\nindex.add(2, \"A B C D E F G H I J 1 2 3 K L\");\nconst result = index.search(\"1 2 3\");\n// --\u003e [2, 1]\n```\n\nThe first index returns ID 1 in the first slot for the best pick, because matched terms are closer to the document root. The 2nd index has context enabled and returns the ID 2 in the first slot, because of the shorter distance between terms.\n\n### Context Options\n\n\u003ctable\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eOption\u003c/td\u003e\n        \u003ctd\u003eValues\u003c/td\u003e\n        \u003ctd\u003eDescription\u003c/td\u003e\n        \u003ctd\u003eDefault\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eresolution\u003c/td\u003e\n        \u003ctd\u003e\n            Number\n        \u003c/td\u003e\n        \u003ctd\u003eSets the scoring \u003ca href=\"#resolution\"\u003eresolution\u003c/a\u003e for the context.\u003c/td\u003e\n        \u003ctd\u003e3\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003edepth\u003cbr\u003e\u003cbr\u003e\u003c/td\u003e\n        \u003ctd\u003e\n            false\u003cbr\u003e\n            Number\n        \u003c/td\u003e\n        \u003ctd\u003eEnable/Disable context index and also sets the maximum initial distance of related terms.\u003c/td\u003e\n        \u003ctd\u003e1\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003ebidirectional\u003c/td\u003e\n        \u003ctd\u003e\n            Boolean\n        \u003c/td\u003e\n        \u003ctd\u003eIf 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.\u003c/td\u003e\n        \u003ctd\u003etrue\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n## Auto-Balanced Cache (By Popularity)\n\nYou need to initialize the cache and its limit of available cache slots during the creation of the index:\n\n```js\nconst index = new Index({ cache: 100 });\n```\n\n\u003e The method `.searchCache(query)` is available for each type of index.\n\n```js\nconst results = index.searchCache(query);\n```\n\n\u003e The cache automatically balance stored entries related to their popularity.\n\nThe cache also stores latest queries. A common scenario is an autocomplete or instant search when typing.\n\n## Index Memory Allocation\n\nThe book \"Gulliver's Travels\" (Swift Jonathan 1726) was indexed for this test.\n\nby default a lexical index is very small:\u003cbr\u003e\n`depth: 0, bidirectional: 0, resolution: 3, minlength: 0` =\u003e 2.1 Mb\n\na higher resolution will increase the memory allocation:\u003cbr\u003e\n`depth: 0, bidirectional: 0, resolution: 9, minlength: 0` =\u003e 2.9 Mb\n\nusing the contextual index will increase the memory allocation:\u003cbr\u003e\n`depth: 1, bidirectional: 0, resolution: 9, minlength: 0` =\u003e 12.5 Mb\n\na higher contextual depth will increase the memory allocation:\u003cbr\u003e\n`depth: 2, bidirectional: 0, resolution: 9, minlength: 0` =\u003e 21.5 Mb\n\na higher minlength will decrease memory allocation:\u003cbr\u003e\n`depth: 2, bidirectional: 0, resolution: 9, minlength: 3` =\u003e 19.0 Mb\n\nusing bidirectional will decrease memory allocation:\u003cbr\u003e\n`depth: 2, bidirectional: 1, resolution: 9, minlength: 3` =\u003e 17.9 Mb\n\nenable the option \"fastupdate\" will increase memory allocation:\u003cbr\u003e\n`depth: 2, bidirectional: 1, resolution: 9, minlength: 3` =\u003e 6.3 Mb\n\n## Presets\n\n1. `memory` primarily optimized for a small memory footprint\n2. `performance` primarily optimized for high performance\n3. `match` primarily optimized for matching capabilities\n4. `score` primarily optimized for scoring capabilities (order of results)\n5. `default` the default balanced profile\n\nThese profiles are covering standard use cases. It is recommended to apply custom configuration instead of using profiles to get the best out. Every profile could be optimized further to its specific task, e.g. extreme performance optimized configuration or extreme memory and so on.\n\nYou can pass a preset during creation/initialization of the index.\n\n## Best Practices\n\n### Page-Load / Fast-Boot\n\nThere are several options to optimize either the page load or when booting up or populate an index on server-side:\n\n- Using [Fast-Boot Serialization](doc/export-import.md#fast-boot-serialization-for-server-side-rendering-php-python-ruby-rust-java-go-nodejs-) for small and simple indexes\n- Using [Non-Blocking Runtime Balancer (Async)](doc/async.md) for populating larger amounts of contents while doing other processes in parallel\n- Using [Worker Indexes](doc/worker.md) will distribute the workload to dedicated balanced threads\n- Using [Persistent Indexes](doc/persistent.md) when targeting a zero-latency boot-up\n\n### Use numeric IDs\n\nIt is recommended to use id values from type `number` as reference when adding content to the index. The reserved byte length of passed ids influences the memory consumption significantly. When stringified numeric IDs are included in your datasets consider replacing these by `parseInt(...)` before pushing to the index.\n\n---\n\nCopyright 2018-2025 Thomas Wilkerling, Hosted by Nextapps GmbH\u003cbr\u003e\nReleased under the \u003ca href=\"http://www.apache.org/licenses/LICENSE-2.0.html\" target=\"_blank\"\u003eApache 2.0 License\u003c/a\u003e\u003cbr\u003e\n","funding_links":["https://github.com/sponsors/ts-thomas","https://opencollective.com/flexsearch","https://liberapay.com/ts-thomas","https://patreon.com/user?u=96245532","https://www.paypal.com/donate/?hosted_button_id=GEVR88FC9BWRW","https://salt.bountysource.com/teams/ts-thomas","https://opencollective.com/flexsearch/donate","https://github.com/sponsors/ts-thomas/","https://liberapay.com/ts-thomas/donate","https://www.patreon.com/user?u=96245532"],"categories":["JavaScript","In Memory","Full Text Search","Search Engines","Install from Source","Search","Vanilla","Typescript / Javascript","Memory","HarmonyOS","数据搜索引擎","Programming Languages","web","目录","UI Components","Static Search library","open-source","前端常用"],"sub_categories":["Other","Vectors","Search","Surveys","Windows Manager","网络服务_其他","JavaScript"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextapps-de%2Fflexsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnextapps-de%2Fflexsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextapps-de%2Fflexsearch/lists"}