[PR #12258] feat: Weaviate supports Chinese bm25 #12223 #27573

Closed
opened 2026-02-21 20:41:47 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/12258

State: closed
Merged: No


Summary

Weaviate is not supports Chinese bm25 in last version。
I looked up Weaviate's official website and found that Weaviate added support for jieba word segmentation after 1.24. The previous version segmented words based on spaces, which does not work for Chinese. The following is my modification method. If there is no problem, I will submit it,Of course it is configurable in docker-compose.yaml.
1、Upgraded Weaviate version
2、Modify the default word segmenter

Tip

Close issue syntax: Fixes #<issue number> or Resolves #<issue number>, see documentation for more details.

Resolves #12223

Reference Links:
https://weaviate.io/developers/weaviate/config-refs/schema#gse-and-trigram-tokenization-methods
https://pkg.go.dev/github.com/go-ego/gse#section-readme

Screenshots

Before After
...
image

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/12258 **State:** closed **Merged:** No --- # Summary Weaviate is not supports Chinese bm25 in last version。 I looked up Weaviate's official website and found that Weaviate added support for jieba word segmentation after 1.24. The previous version segmented words based on spaces, which does not work for Chinese. The following is my modification method. If there is no problem, I will submit it,Of course it is configurable in docker-compose.yaml. 1、Upgraded Weaviate version 2、Modify the default word segmenter > [!Tip] > Close issue syntax: `Fixes #<issue number>` or `Resolves #<issue number>`, see [documentation](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) for more details. Resolves #12223 Reference Links: https://weaviate.io/developers/weaviate/config-refs/schema#gse-and-trigram-tokenization-methods https://pkg.go.dev/github.com/go-ego/gse#section-readme # Screenshots | Before | After | |--------|-------| | ... | ![image](https://github.com/user-attachments/assets/5fb54eee-2bcf-4124-a525-a0d4d76bc54a) | # Checklist > [!IMPORTANT] > Please review the checklist below before submitting your pull request. - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:41:47 -05:00
yindo closed this issue 2026-02-21 20:41:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#27573