docusaurus-search-local
docusaurus-search-local copied to clipboard
Built-in Split Chinese Characters
As code here:
https://github.com/easyops-cn/docusaurus-search-local/blob/86561f6dc2549da9d65bacbfcc05a379f886757a/docusaurus-search-local/src/shared/lunrLanguageZh.ts#L29-L32
when I tried to define "涛之雨" as a phrases, it will not work, cause "之" will be removed, and it comes to "涛雨" (and finally split into "涛" and "雨").
The lucky in misfortune is that when searching "涛之雨" it will still work cause when searching "涛之雨", it will match "涛??雨", and works as well.
Try this option
zhUserDict
, E.g.:zhUserDict: "涛之雨\n云之南"
![]()
~~Unfortunately, that doesn't work.In the code shown above, “之” will be removed.~~
Fine, I'll retry the zhUserDict
instead of zhUserDictPath
, I'm not sure is there any difference between them.