Non-English search support
Open
Nobody has claimed this yet.
C-enhancement
- Dominant language
- Rust
- Stars
- 22.2k
- Forks
- 1.9k
- PR merge metrics
- PR metrics pending
Description
#1081 has been stuck for a while, so I tried implementing my own version.
Preview the search functionality online
Inspired by #1496.
Major implementation steps:
- Land #2392
- Fix buggy teaser (preview) ^1
- Keyword highlighting doesn't work as expected for Chinese
- The selected range displayed as teaser sometimes contains no keywords at all (the target chapter does contain the keyword though)
- Enhance mixed multi language search support
- Implement a "fallback" strategy for text in mixed languages (detail)
- Fix buggy teaser (preview) ^1
- Support Emoji search
- Fix
elasticlunr-rs's indexing implemantation (detail)
- Fix
- Localize UI rendered by HTML renderer
Unresolved questions:
Should(Not likely, since it causes severe binary size bloat)search-non-englishfeature be enabled by default?- Should each supported language have an individual feature flag? Would it make the feature flag list too noisy?
- Should we consider other search solutions than elasticlunr.js & lunr-languages?
- Should the new "fallback" search implementation apply to English books as well?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing #2392 and the linked implementation details, then examine the elasticlunr-rs indexing work and the HTML renderer localization scope. Done means the remaining checklist items are resolved and the feature-flag, search-solution, and fallback-strategy questions have decisions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, rust
- Domain
- search, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100