rust-lang / mdBook

Create book from markdown files. Like Gitbook but implemented in Rust
https://rust-lang.github.io/mdBook/
Mozilla Public License 2.0
17.72k stars 1.61k forks source link

Consider using a search library that handles typo tolerance #764

Open dguo opened 6 years ago

dguo commented 6 years ago

Hello. I recently finished reading the Rust book, and when I played around with the search feature, I realized that it doesn't handle typos. You just don't get any results. I read through https://github.com/rust-lang-nursery/mdBook/issues/51, and I didn't see any mention of Fuse.js, which is like Elasticlunr, but is designed to handle fuzzy-searching/typos.

Would the mdBook owners be open to possibly switching to it? There might be disadvantages too, like a noticeably slower search or subjectively worse results, so it would take some investigation/experimentation.

mattico commented 6 years ago

I would be open to changing the search library if it would improve the user experience. Some things to keep in mind:

Feel free to ask me if you have any questions!