feat: Update FlexSearch and Add Support for All Languages (#2108)

* chore(deps): update flexsearch to version 0.8.205 and adjust search encoder.

* refactor(search): enhance search encoder and update search results type

- Improved the encoder function to filter out empty tokens.
- Updated the search results type from a specific FlexSearch type to a more generic 'any' type for flexibility.
- Removed redundant rtl property from the index configuration.

* refactor(search): remove rtl property from search index configuration

* refactor(search): improve encoder function formatting

- Updated the encoder function to use consistent arrow function syntax for better readability.

* refactor(search): update search results type to DefaultDocumentSearchResults

- Imported DefaultDocumentSearchResults from FlexSearch for improved type safety.
- Changed the type of searchResults from 'any' to DefaultDocumentSearchResults<Item> for better clarity and maintainability.
This commit is contained in:
Amir Pourmand
2025-09-18 02:09:30 +03:30
committed by GitHub
parent 6add0c837e
commit 03ccac2872
3 changed files with 43 additions and 10 deletions

View File

@@ -46,7 +46,7 @@
"cli-spinner": "^0.2.10",
"d3": "^7.9.0",
"esbuild-sass-plugin": "^3.3.1",
"flexsearch": "0.7.43",
"flexsearch": "^0.8.205",
"github-slugger": "^2.0.0",
"globby": "^14.1.0",
"gray-matter": "^4.0.3",