Add Search Index Support for Korean (ko)

Hello Zola Community,

I’d like to propose adding support for building search indexes for the Korean language (ko).

Currently, Zola reports that building a search index for ko is not supported when build_search_index = true is set in the [languages.ko] section of config.toml.

My understanding is that elasticlunr-rs, the search library Zola uses, has capabilities for handling Korean text(elasticlunr-rs/Cargo.toml at 5c50f78aa0b3a0769dff613f6d550135e3e20ee3 · mattico/elasticlunr-rs · GitHub / v3.0.2). To confirm this and explore adding the support, I’ve made a modification in my fork of the Zola repository.

In this branch, I’ve enabled the ko feature for elasticlunr-rs in the relevant Cargo.toml file. I’ve tested this locally on a Korean-language site, and the search index builds and functions correctly.

Output

Zola binary size check

# build master branch
wc -c target/release/zola
 34567728 target/release/zola

# build add-ko-to-build-search-index branch
wc -c target/release/zola
 34600768 target/release/zola

Following the guidance in the CONTRIBUTING.md regarding proposing new features, I wanted to open a discussion here before creating a formal Pull Request.

Is adding Korean search support something the core team and community are interested in? Are there any known complexities or considerations related to Korean text processing that I should be aware of?

I’m happy to discuss the implementation details and refine the changes based on your feedback.

Thanks for your time and guidance!

1 Like

We can add it

1 Like