Add Japanese search indexing not working


I’ve been trying to include Japanese language search indexing, but I am currently lost. Any help would be appreciated.

From the Docs it mentions:

Note: By default, Chinese and Japanese search indexing is not included. You can include the support by building zola using cargo build --features search/indexing-ja search/indexing-zh.

So I cloned the current git repo (I think version 0.13.0) and issued the command cargo build --features search/indexing-ja (I am on a Mac if that helps). I get the following error message:

does not have a dependency named `search`

Not sure if it’s right, but next I added the search path to Cargo.toml.

serde_json = "1.0"
search = { path = "components/search" }
site = { path = "components/site" }

It starts building but stops with the following errors.

error[E0252]: the name `Deserialize` is defined multiple times

→ components/utils/src/
1 | use serde::{Deserialize, Deserializer};
| ----------- previous import of the macro Deserialize here
2 | use serde_derive::Deserialize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ Deserialize reimported here
= note: Deserialize must be defined only once in the macro namespace of this module

warning: unused import: serde_derive::Deserialize
→ components/utils/src/
2 | use serde_derive::Deserialize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= note: #[warn(unused_imports)] on by default

error: aborting due to previous error; 1 warning emitted

For more information about this error, try rustc --explain E0252.
error: could not compile utils

Any help would be much appreciated.


I think I got it working, but not sure if the solution is the correct one. If it doesn’t break anything perhaps I can make a PR for it.

Basically, I removed use serde_derive::Deserialize; from components/utils/src/ in the source directory.

Also added search = { path = "components/search" } in ./cargo.toml in the source directory. With the added changes, it now creates the 90 MB or so binary.