Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Japanese Kanji cannot search #4561

Closed
exkoi opened this issue Apr 10, 2024 · 5 comments
Closed

Japanese Kanji cannot search #4561

exkoi opened this issue Apr 10, 2024 · 5 comments
Labels
duplicate This issue or pull request already exists

Comments

@exkoi
Copy link

exkoi commented Apr 10, 2024

Describe the bug
Japanese Kanji cannot search

To Reproduce
Create Index:

curl -X POST 'http://localhost:7700/indexes' \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "uid": "hospitals",
    "primaryKey": "id"
  }'

Setting index:

curl -X PATCH 'http://localhost:7700/indexes/hospitals/settings' \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "searchableAttributes": [
      "name",
      "kana"
    ],
    "displayedAttributes": [
      "name",
      "kana"
    ]
  }'

Insert documents:

curl -X POST 'http://localhost:7700/indexes/hospitals/documents' \
  -H 'Content-Type: application/json' \
  --data-binary '[
      { "id": 1, "name": "日健クリニック", "kana": "ニッケンクリニック" },
      { "id": 2, "name": "日見中央病院", "kana": "ヒミチュウオウビョウイン" }
  ]'

Expected behavior
When search for the word "健", I want "日健クリニック" to be hit, but documents containing "見" are hit.
In Japanese, "健" and "見" both have the same pronunciation as "ken", but they have different meanings.

Screenshots
meilisearch

Meilisearch version:
v1.7.2

Additional context
Docker Image: getmeili/meilisearch:v1.7

@uintaam
Copy link

uintaam commented Apr 15, 2024

This is because Meilisearch defaults to Chinese support. I have the same issue #4162

You can use the Japanese builds to solve your problem #3882

@exkoi
Copy link
Author

exkoi commented Apr 15, 2024

This is because Meilisearch defaults to Chinese support. I have the same issue #4162

You can use the Japanese builds to solve your problem #3882

@uintaam Thank you for your reply!
Can I use Japanese build without Docker? (I use Ubuntu22.04 without Docker in production)

@curquiza
Copy link
Member

curquiza commented Apr 16, 2024

Hello @exkoi, two solutions

  • compile from source. See the related docs ("Source tab"). But instead of cargo build --release, use this command: cargo build --release -p meilisearch -p meilitool --no-default-features --features "analytics mini-dashboard japanese"
  • or, if you don't want to bother with this, you can also use our cloud offer and ask support team (in the chat box) to use Japanese version

@exkoi
Copy link
Author

exkoi commented Apr 17, 2024

Thank you @curquiza !
I'll try your solution

@curquiza curquiza added the duplicate This issue or pull request already exists label Apr 17, 2024
@curquiza
Copy link
Member

I'm closing this issue since we have another opened 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants