praveenn77 / docusaurus-lunr-search

Local / Offline Search for docusaurus
https://praveenn77.github.io/docusaurus-lunr-search-demo/
MIT License
493 stars 79 forks source link

wrong search result for some Czech characters #64

Open weissdan opened 3 years ago

weissdan commented 3 years ago

Hi lelouch, trying to use the lunr-search plugin on Docusaurus 2.0.0-beta.4 having docs in Czech language. The search engine ignores some Czech characters, e.g. the word "čas" (time) in our web pages https://help.4fastdevelopment.cz/docs/DXCAP/Lifecycle.

example

The same issue can be found in your demo web pages https://lelouch77.github.io/docusaurus-lunr-search-multilang/docs/doc3, the German word "können". You can copy it to search bar and you will see. But the another word with German characters "müssen" on the same page works fine.

Please could you check the search engine or just advise me what to set or change in docusaurus/plugin settings? Thanks.

praveenn77 commented 3 years ago

Try this plugin https://github.com/easyops-cn/docusaurus-search-local

weissdan commented 3 years ago

Already tried https://github.com/cmfcmf/docusaurus-search-local and the result is the same. Your plugin gives me the error during npm run build:

Module not found: Error: Can't resolve '../../utils/proxiedGenerated' in '/home/daniel/my-website/src/theme/SearchBar' Module not found: Error: Can't resolve '../../utils/SearchSourceFactory' in '/home/daniel/my-website/src/theme/SearchBar' Module not found: Error: Can't resolve '../../utils/proxiedGenerated' in '/home/daniel/my-website/src/theme/SearchBar' Module not found: Error: Can't resolve '../LoadingRing/LoadingRing' in '/home/daniel/my-website/src/theme/SearchBar' Module not found: Error: Can't resolve '../../utils/highlight' in '/home/daniel/my-website/src/theme/SearchBar' Module not found: Error: Can't resolve '../../utils/highlightStemmed' in '/home/daniel/my-website/src/theme/SearchBar' Module not found: Error: Can't resolve '../../utils/getStemmedPositions' in '/home/daniel/my-website/src/theme/SearchBar' Module not found: Error: Can't resolve '../../utils/proxiedGenerated' in '/home/daniel/my-website/src/theme/SearchBar' Module not found: Error: Can't resolve '../../utils/proxiedGenerated' in '/home/daniel/my-website/src/theme/SearchBar' Client bundle compiled with errors therefore further build is impossible.

Your plugin was installed without problem (npm install --save @easyops-cn/docusaurus-search-local), then swizzled (npm run swizzle docusaurus-lunr-search SearchBar -- --danger), added to docusaurus.config.js, but the build failed.

Do you have any quick tip how to build it without errors? Thanks.