[PR #29346] feat: Add startup parameters for language-specific Weaviate tokenizer #32380

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

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

State: closed
Merged: No


Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Expose Weaviate language-specific tokenizer toggles (GSE, kagome_ja, kagome_kr) in docker envs/compose so CJK (Chinese, Japanese, Korean) tokenization can be configured without manual edits.

Problem

Docker deployments couldn’t enable proper CJK tokenization; defaults assume English and manual compose edits get overwritten on regeneration.

Solution

Add the four tokenizer env vars to .env.example, propagate them to docker-compose.yaml , keeping defaults false to preserve existing behavior. Official Docs

ac75491092b7920b64a2b6c7c1442638

In .env.example:

WEAVIATE_ENABLE_TOKENIZER_GSE=false
WEAVIATE_ENABLE_TOKENIZER_KAGOME_JA=false
WEAVIATE_ENABLE_TOKENIZER_KAGOME_KR=false

In docker-compose.yaml:

WEAVIATE_ENABLE_TOKENIZER_GSE: ${WEAVIATE_ENABLE_TOKENIZER_GSE:-false}
WEAVIATE_ENABLE_TOKENIZER_KAGOME_JA: ${WEAVIATE_ENABLE_TOKENIZER_KAGOME_JA:-false}
WEAVIATE_ENABLE_TOKENIZER_KAGOME_KR: ${WEAVIATE_ENABLE_TOKENIZER_KAGOME_KR:-false}

Improvements:

CJK deployments can opt-in to correct tokenization via env vars; no change for existing setups unless the new flags are set. No new tests needed for config-only changes.

Checklist

  • 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/29346 **State:** closed **Merged:** No --- > [!IMPORTANT] > > 1. Make sure you have read our [contribution guidelines](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) > 1. Ensure there is an associated issue and you have been assigned to it > 1. Use the correct syntax to link this PR: `Fixes #<issue number>`. ## Summary Expose Weaviate language-specific tokenizer toggles (GSE, kagome_ja, kagome_kr) in docker envs/compose so CJK (Chinese, Japanese, Korean) tokenization can be configured without manual edits. ## Problem Docker deployments couldn’t enable proper CJK tokenization; defaults assume English and manual compose edits get overwritten on regeneration. ## Solution Add the four tokenizer env vars to `.env.example`, propagate them to `docker-compose.yaml` , keeping defaults false to preserve existing behavior. [Official Docs](https://docs.weaviate.io/deploy/configuration/env-vars#ENABLE_TOKENIZER_GSE) ![ac75491092b7920b64a2b6c7c1442638](https://github.com/user-attachments/assets/2283d22c-9879-4080-ac72-3adbccf119be) In `.env.example`: ``` WEAVIATE_ENABLE_TOKENIZER_GSE=false WEAVIATE_ENABLE_TOKENIZER_KAGOME_JA=false WEAVIATE_ENABLE_TOKENIZER_KAGOME_KR=false ``` In `docker-compose.yaml`: ``` WEAVIATE_ENABLE_TOKENIZER_GSE: ${WEAVIATE_ENABLE_TOKENIZER_GSE:-false} WEAVIATE_ENABLE_TOKENIZER_KAGOME_JA: ${WEAVIATE_ENABLE_TOKENIZER_KAGOME_JA:-false} WEAVIATE_ENABLE_TOKENIZER_KAGOME_KR: ${WEAVIATE_ENABLE_TOKENIZER_KAGOME_KR:-false} ``` ## Improvements: CJK deployments can opt-in to correct tokenization via env vars; no change for existing setups unless the new flags are set. No new tests needed for config-only changes. ## Checklist - [ ] 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:51:17 -05:00
yindo closed this issue 2026-02-21 20:51:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#32380