# Add Japanese search indexing not working

**URL:** <https://zola.discourse.group/t/add-japanese-search-indexing-not-working/871>\
**Category:** Support\
**Created:** [April 11, 2021, 6:27am UTC](https://zola.discourse.group/t/add-japanese-search-indexing-not-working/871 "2021-04-11T06:27:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kinxiel](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/kinxiel/32/490_2.png) [@kinxiel](https://zola.discourse.group/u/kinxiel)\
**Post date:** [April 11, 2021, 6:27am UTC](https://zola.discourse.group/t/add-japanese-search-indexing-not-working/871/1 "2021-04-11T06:27:25Z")

</div>

Hi,

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/de.rs:2:5  
|  
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/de.rs:2:5  
|  
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.

Thanks

---

<div class="post-metadata">

**Author:** ![kinxiel](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/kinxiel/32/490_2.png) [@kinxiel](https://zola.discourse.group/u/kinxiel)\
**Post date:** [April 11, 2021, 7:23am UTC](https://zola.discourse.group/t/add-japanese-search-indexing-not-working/871/2 "2021-04-11T07:23:48Z")

</div>

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/de.rs` 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.

---

<div class="post-metadata">

**Author:** ![hatappo](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/hatappo/32/632_2.png) [@hatappo](https://zola.discourse.group/u/hatappo)\
**Post date:** [November 15, 2021, 6:18pm UTC](https://zola.discourse.group/t/add-japanese-search-indexing-not-working/871/3 "2021-11-15T18:18:24Z")

</div>

I am also using m1 mac book air. And I got it working in local environment. I don’t know the details of the differences with your environment or procedure, but I have placed a binary for Ubuntu that has been rebuilt with Japanese and Chinese search enabled. (Of course, it would be useful to be able to build binaries for the M1 Mac, but I couldn’t figure out how to do that with GitHub Actions.)

> **[Releases · hatappo/zola](https://github.com/hatappo/zola/releases)**
>
> A fast static site generator in a single binary with everything built-in. https://www.getzola.org - hatappo/zola

I’ve also prepared GitHub Actions to deploy with it, so you should be able to use Japanese full-text search with these.

ttps://github.com/hatappo/zola-deploy-action

I’ve also written a blog post about it in Japanese.

[https://www.jpgov.art/posts/japanese-full-text-search-on-zola/](https://www.jpgov.art/posts/japanese-full-text-search-on-zola/)

I hope this information is useful to you.
