Closed favoyang closed 3 years ago
realted to #207 you need to provide your own "encoder" which will apply these transformation in dependence of matched language.
Probably the best solution is to use 2 indexes, each for every language and apply your queries on one or both of them.
encode: function(str){ const cjkItems = str.replace(/[\x00-\x7F]/g, "").split(""); const asciiItems = str.split(/\W+/); return cjkItems.concat(asciiItems); }
It does work! But I don't know what impact it will have on performance
How flexsearch handle mixed langs, like English mixed with CJK?
English:
CJK
By mixing these two I get:
But I want to achieve that keep the CJK tokens but apply the "reverse" behaviors to English letters. Possible?
i.e.