TypeError: b.toLowerCase is not a function
at K.Aa (/Users/ppsztyc/workspace/arc/cli/node_modules/flexsearch/dist/flexsearch.bundle.js:33:779)
at K.Da (/Users/ppsztyc/workspace/arc/cli/node_modules/flexsearch/dist/flexsearch.bundle.js:33:991)
at K.Ha (/Users/ppsztyc/workspace/arc/cli/node_modules/flexsearch/dist/flexsearch.bundle.js:33:1449)
at Ka [as encode] (/Users/ppsztyc/workspace/arc/cli/node_modules/flexsearch/dist/flexsearch.bundle.js:33:1634)
at K.t.add (/Users/ppsztyc/workspace/arc/cli/node_modules/flexsearch/dist/flexsearch.bundle.js:12:102)
at V (/Users/ppsztyc/workspace/arc/cli/node_modules/flexsearch/dist/flexsearch.bundle.js:25:353)
at V (/Users/ppsztyc/workspace/arc/cli/node_modules/flexsearch/dist/flexsearch.bundle.js:25:453)
at V (/Users/ppsztyc/workspace/arc/cli/node_modules/flexsearch/dist/flexsearch.bundle.js:25:420)
at V (/Users/ppsztyc/workspace/arc/cli/node_modules/flexsearch/dist/flexsearch.bundle.js:25:453)
at Q.t.add (/Users/ppsztyc/workspace/arc/cli/node_modules/flexsearch/dist/flexsearch.bundle.js:26:191)
I identified the problem with the use of the charset: 'latin:extra', configuration property. After removing the configuration property it starts working again. The same behavior is for latin:advanced value.
I am not sure how to proceed now. I need the extra variant to match the query. Any help would be appreciated.
To add, the library is an ESM module (as it has "type": "module") in the package.json file so all imports are resolved as ESM. You then run the file as node test.js.
I am using flexsearch version 0.7.21.
The following code results in an error.
The
test.js
file:And the result is:
I identified the problem with the use of the
charset: 'latin:extra',
configuration property. After removing the configuration property it starts working again. The same behavior is forlatin:advanced
value.I am not sure how to proceed now. I need the
extra
variant to match the query. Any help would be appreciated.