-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search does not support non-English languages #1081
Comments
mdBook uses elasticlunr.js for offline searching under the hood. And according to this issue weixsong/elasticlunr.js#53, it seems that there is no plan to support searching in other languages. |
it is a good tools. I love it. We, more than 1 million peoples, have the same issue. could you help on it? or, could we search chinese with google? |
Yes, it is highly possible to add searching in Chinese characters.
|
Any new progress for this issue? |
There is a PR #1496 working on it but needs help. |
Replacing |
Looking forward to new progress on this MR |
@ehuss Would you please tell me if this feature would be accepted? I don't think I'm able to find out any more issues by prototyping. In case you're too busy to read the whole comment, I will highlight some key issues for you. All modifications are feature-gated.
All mentioned modifications except the custom dictionary are available to check in my fork. I would appreciate it a lot if you could tell me about your attitudes toward this feature and/or the issues I listed. Importing Apart from all these, there are still some details we need to discuss:
I'll be keeping an eye on this comment to see if anyone is interested. UpdateI created a fork as a proof-of-concept, and I find some problems that I didn't notice at the time I posted this comment. Anyone willing to test it may build the forked repository with Update 2Listed some more problems. |
How to use it,can you give a example about the book.toml? I fork your |
Any new progress on this issue? |
It was a lie. Аnd kind of long journey... But anyway, here am i, and my instructions for adding non-english search by little blood:
searchindex = elasticlunr(function() {
// adding (multi)language
this.use(elasticlunr.multiLanguage('en', 'ru'));
// fields to index.
this.addField('title');
this.addField('body');
this.addField('breadcrumbs');
// Identify documents field
this.setRef('id');
// Get all documents stored in prebuilded index
for (let key in config.index.documentStore.docs) {
this.addDoc(config.index.documentStore.docs[key]);
}
}); And search will be fine. But one more word: when mdbook build |
This issue is 5 years old and no actuall progress in the code base yet? It fails even with diacrits like áàã, etc witch in theory could be very easy to handle with normalization and canonical decomposition... |
Unable to search for Chinese Keywords
The text was updated successfully, but these errors were encountered: