×
Mattermost v11.0 is now available! Learn what's new »
  • Platform

    Platform

    • Overview
    • Channels
    • Playbooks
    • Integrations
    • Mobile
    • Security
    • Trust Center

    Interoperability

    • MS Teams
    • Atlassian
    • GitLab

    Flexible Deployment

    • On-Premise
    • Cloud
  • Solutions

    Use Cases

    • Purpose-Built Collaboration Hub
    • Self-Sovereign Collaboration
    • Mission-Critical ChatOps
    • Real-Time DevSecOps Collaboration
    • Integrated Security Operations
    • Out-of-Band Incident Response

    Industries

    • Critical Infrastructure
    • Defense
    • Technology
    • Global Public Sector
    • Financial Services
    • Energy and Utilities
    • Manufacturing
  • Customers

    Customers

    • USAF
    • Fujitsu
    • RTE
    • CERN
    • NRI
    • Pramacom
    • Crossover Health
    • Netfoundry
    See more customer stories »
  • Pricing
  • Partners

    Partners

    • Become a Partner
    • Partner Program
    • Deal Registration
  • Resources

    Resources

    • Resource Library
    • Blog
    • Demos
    • Events

    Documentation

    • Academy
    • Channels Guide
    • Playbooks Guide
    • Admin
    • Docs
    • API Reference
    • Release Notes

    Community

    • Join Community
    • Contribute
    • Deploy
    • Integrate
    • Download
  • Login

    Login

    • My Workspace
    • Admin Portal
    • Apps
    • Support
  • Contact Sales
Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Mattermost documentation
Mattermost documentation
  • Overview
    • Editions and Offerings
    • Mattermost Plans
    • Subscription Overview
      • Self-Hosted
      • Cloud
        • Cloud Dedicated
        • Cloud Shared
        • Cloud VPC Private Connectivity
      • Non-Profit
    • Certifications and Compliance Overview
    • Accessibility Compliance Policy
    • Releases and Life Cycle
      • Release Policy
      • Server
        • Server Releases
        • v11 Changelog
        • v10 Changelog
        • Unsupported Legacy Releases
        • Version Archive
        • UI & ADA Changelog
      • Desktop
        • Desktop Releases
        • Desktop App Changelog
      • Mobile
        • Mobile Releases
        • Mobile Apps Changelog
      • Removed and Deprecated Features
    • Frequently Asked Questions
      • General
      • Enterprise
      • Federal Procurement
      • Business & Licensing
        • Source Available License
  • Use Case Guide
    • Integrated Security Operations
    • Maximize Your Microsoft Investments
    • Mission-Ready Mobile
    • On-Premises Skype for Business Replacement
    • Out-of-Band Incident Response
    • Purpose-Built Collaboration
    • Real-Time DevSecOps Collaboration
    • Secure Command and Control
    • Self-Sovereign Collaboration
  • Deployment Guide
    • Quick Start Evaluation
    • Reference Architecture
      • Application Architecture
      • Scaling Architecture
        • Deployment architecture at scale
        • Backing storage benchmarks
        • Enterprise search
          • Elasticsearch setup
          • AWS OpenSearch setup
        • High availability
        • Redis
        • Scale up to 200 users
        • Scale up to 2000 users
        • Scale up to 15000 users
        • Scale up to 30000 users
        • Scale up to 50000 users
        • Scale up to 80000 users
        • Scale up to 90000 users
        • Scale up to 100000 users
        • Scale up to 200000 users
      • Deployment Scenarios
        • Out-of-Band Communications
        • Mission Partner Collaboration
        • Enterprise to Edge DDIL Operations
        • Sovereign Collaboration in Microsoft
        • Air-gapped Environments
    • Server Deployment
      • Preparations
        • Review software and hardware requirements
        • Set up an NGINX proxy
        • Configure Mattermost Calls
        • Set up TLS
        • Use an image proxy
      • Deploy with Kubernetes
      • Deploy with Linux
      • Deploy with Containers
      • Pre-authentication secrets
      • Deployment Solution Programs
    • Desktop App Deployment
      • Install desktop app on Linux
      • Distribute a custom desktop app
      • Silent Windows desktop distribution
      • Desktop MSI installer and group policy guide
      • Desktop App custom dictionaries
      • Desktop managed resources
    • Mobile App Deployment
      • Configure Microsoft Intune Mobile Application Management (MAM)
      • Deploy using an EMM provider
      • Distribute a custom mobile app
      • Host your own push proxy service
      • Mobile VPN options
      • Mobile security features
      • Secure file storage
      • Mobile apps FAQ
    • Deployment Troubleshooting
      • General deployment troubleshooting
      • Docker deployment troubleshooting
      • Desktop app troubleshooting
      • Mobile app troubleshooting
      • PostgreSQL installation troubleshooting
      • MySQL installation troubleshooting
  • Administration Guide
    • Self-hosted billing
    • Cloud workspace management
      • Workspace migration
      • Cloud data residency
      • Cloud IP Filtering
      • Cloud Bring Your Own Key (BYOK)
    • Server maintenance
      • Install a license key
      • Generate a support packet
      • Backup and disaster recovery
      • Upgrade Mattermost server
        • Important upgrade notes
        • Prepare to upgrade Mattermost
        • Communicate scheduled maintenance best practices
        • Upgrade Mattermost Server
        • Upgrade Mattermost in Kubernetes and High Availability environments
        • Upgrade Team Edition to Enterprise Edition
        • Administrator onboarding tasks
        • Enterprise roll-out-checklist
        • Welcome email to end users
        • Downgrade Mattermost Server
        • Open source components
      • Secure Mattermost
        • Encryption options
        • Transport encryption
        • Multi-factor authentication
        • Delegated granular administration
        • Custom terms of service
        • User and group provisioning via AD/LDAP
        • SAML-based SSO
          • Okta SAML Configuration
          • Generate self-signed certificates
          • OneLogin SAML Configuration
          • Microsoft ADFS SAML Configuration for Windows Server 2012
          • Microsoft ADFS SAML Configuration for Windows Server 2016
          • Microsoft Entra ID SAML Configuration
          • Keycloak SAML Configuration
        • SAML SSO techical documentation
        • Certificate-based authentication
      • Mattermost error codes
      • Logging
      • mmctl
      • CLI
      • Feature labels
    • Server configuration
      • Store configuration in your database
      • Server configuration options
        • Self-hosted workspace edition and license settings
        • Cloud workspace subscription, billing, and account settings
        • Reporting configuration settings
        • User management configuration settings
        • System attributes
        • Environment configuration settings
        • Site configuration settings
        • Authentication configuration settings
        • Plugins configuration settings
        • Integrations configuration settings
        • Compliance configuration settings
        • Experimental configuration settings
        • Deprecated configuration settings
        • Bleve search
      • Set up attribute-based access controls
        • System-wide attribute-based access policies
        • Channel-specific access rules
      • Set up Mattermost Agents
        • LLM provider configuration guide
        • Implementing Sovereign AI
      • Install Mattermost Boards
      • Manage user attributes
      • Enable content flagging
      • Environment variables
      • Customize the server
        • Customize Mattermost
        • Custom branding tools
        • Code signing custom builds
      • SMTP email setup
      • Email templates
      • Chinese, Japanese, and Korean search
      • SSL client certificate setup
      • Connected workspaces
      • Telemetry
    • User provisioning
      • Corporate directory integrations
      • Provisioning workflows
      • AD/LDAP setup
      • AD/LDAP manage team or private channel membership
      • GitLab SSO
      • OpenID Connect SSO
      • Google SSO
      • Entra ID SSO
      • Convert OAuth 2.0 providers to OpenID
    • User management
      • Permissions
      • Manage team and channel configuration
      • Advanced permissions infrastructure
      • Guest accounts
    • Monitoring and performance
      • Optimize your Mattermost workspace
      • Collect performance metrics
      • Deploy Prometheus and Grafana for performance monitoring
      • Performance monitoring metrics
      • Push notification health targets
      • Performance alerting guide
      • Ensuring releases perform at scale
      • Manage user surveys
      • User satisfaction surveys
      • Notify admin
      • System-wide notifications
      • Statistics
      • In-product notices
      • Health checks
      • Health check probes
      • Product limits
    • Compliance
      • Compliance export
      • Compliance monitoring
      • Electronic discovery
      • Data retention
      • Export channel data
      • Legal Hold
      • JSON audit log schema
    • Migration
      • Migrate from MySQL to PostgreSQL
        • Automate PostgreSQL migration
        • Manually migrate to PostgreSQL
      • Server migration guide
      • Migrate from Slack
      • Migrate from Gitlab Omnibus
      • Bulk export tool
      • Bulk loading tool
      • Migration announcement email template
  • Security Guide
    • Zero Trust with Mattermost
    • CMMC Compliance
    • Mobile Security
    • Dependency Vulnerability Analysis
    • HIPAA Compliance
    • FINRA Compliance
  • End User Guide
    • Access Your Workspace
      • Install the desktop app
      • Install the iOS mobile app
      • Install the Android mobile app
      • Client availability
      • Log out of Mattermost
    • Messaging Collaboration
      • Organize using teams
        • Team settings
        • Team keyboard shortcuts
      • Organize using custom user groups
      • Invite people
      • Learn about Mattermost roles
      • View system information
      • Collaborate within channels
        • Channel types
        • Channel naming conventions
        • Communicate a channel's focus and scope
        • Create channels
        • Rename channels
        • Display channel banners
        • Convert public channels to private channels
        • Convert group messages to private channels
        • Join and leave channels
        • Make calls in Mattermost
        • Manage channel members
        • Browse channels
        • Navigate between channels
        • Mark channels as favorites
        • Manage channel bookmarks
        • Mark channels as unread
        • Archive and unarchive channels
      • Communicate with messages and threads
        • Send messages
        • Reply to messages
        • React with emojis and GIFs
        • Organize conversations
        • Mark messages as unread
        • Forward messages
        • Share links to channels and messages
        • Save and pin messages
        • Set message reminders
        • Search for messages
        • Schedule messages
        • Flag messages
        • Format messages
        • Set message priority
        • Mention people
        • Share files in messages
      • Collaborate within Microsoft Teams
      • Keyboard shortcuts
        • Keyboard accessibility
      • Extend Mattermost with integrations
    • Workflow Automation
      • Learn about collaborative playbooks
      • Work with collaborative playbooks
      • Work with runs
      • Work with tasks
      • Work with notifications and updates
      • Work with metrics and goals
      • Share and collaborate
      • Interact with collaborative playbooks
    • Audio and Screensharing
    • Project and Task Management
      • Navigate boards
      • Work with boards
      • Work with cards
      • Work with views
      • Work with groups, filter, and sort
      • Work with calculations
      • Share and collaborate
      • Import, export, and migrate
      • Boards settings
    • AI Agents
      • Agents usage tips and best practices
      • Agents context management
    • Customize Your Preferences
      • Manage your notifications
        • Troubleshoot notifications
        • Manage your web notifications
        • Manage your desktop notifications
        • Manage your mobile notifications
        • Manage your thread reply notifications
        • Manage your @mention & keyword notifications
        • Manage your channel-specific notifications
      • Customize your Mattermost theme
      • Customize your channel sidebar
      • Manage your profile
      • Manage your security preferences
      • Set your status & availability
      • Manage your display options
      • Manage your sidebar options
      • Manage advanced options
      • Manage your plugin preferences
      • Customize your desktop app experience
      • Connect to multiple workspaces
  • Integrations Guide
    • Plugins
      • Popular Pre-Built Integrations
        • Mattermost Channel Export
        • Mattermost Legal Hold
        • Mattermost Metrics
        • Mattermost User Survey
        • Mattermost Embedded for M365, Teams, and Outlook
        • Microsoft Calendar
        • Microsoft Teams Meetings
        • Microsoft Teams Sync
        • GitHub
        • GitLab
        • Jira
        • ServiceNow
        • Zoom
    • Webhooks
      • Incoming Webhooks
      • Outgoing Webhooks
    • Slash Commands
      • Built-In Slash Commands
      • Run Slash Commands
    • RESTful API
    • No-Code Automation
    • Frequently Asked Questions
  • Training and Support
    • Join our community
    • Community for Mattermost
    • Contribute to this documentation
Back to top
Edit this page

Chinese, Japanese and Korean search¶

plans-img-yellow Available on Entry, Professional, Enterprise, and Enterprise Advanced plans

`{Attention} Starting on Mattermost v11.5, searching for Chinese, Japanese or Korean (CJK) characters can be enabled with the `feature flag <https://developers.mattermost.com/contribute/more-info/server/feature-flags/#changing-feature-flag-values>` ``MM_FEATUREFLAGS_CJKSEARCH.

The general recommendation of using either Elasticsearch or Opensearch once the server reaches 2.5 million posts https://docs.mattermost.com/administration-guide/scale/enterprise-search.html#do-i-need-to-use-elasticsearch-or-aws-opensearch still applies.

What follows is the special configuration required for versions older than v11, where MySQL was still supported. ```

See :doc:``database requirements documentation </deployment-guide/software-hardware-requirements>` for how to set up search for these languages.

Below is additional information on how to configure the database for different languages.

中文 / Chinese¶

尽管在 Mattermost 8.0 更新后,官方推荐为了更好的性能请使用 PostgreSQL 作为后端数据库。

但就目前而言,使用 MySQL 能够更容易的实现中文语言的全文搜索功能,在妥善配置 ngram 后,根据官方数据库构造重新生成索引即可达成。 具体的操作方式,可参考: Cannot search CJK contents。

有关 PostgreSQL 的配置方式,请参考以下流程:

配置 SCWS¶

# 取得 SCWS 代码
wget http://www.xunsearch.com/scws/down/scws-1.2.3.tar.bz2
# 解压缩
tar xvjf scws-1.2.3.tar.bz2
# 进入解压后的目录
cd scws-1.2.3
# 执行配置脚本、编译并安装
./configure --prefix=/usr/local/scws ; make ; make install

# 可选:检查文件是否存在
ls -al /usr/local/scws/lib/libscws.la
/usr/local/scws/bin/scws -h
# 可选:将词典安装在 /usr/local/scws/etc 中
cd /usr/local/scws/etc
wget http://www.xunsearch.com/scws/down/scws-dict-chs-gbk.tar.bz2
wget http://www.xunsearch.com/scws/down/scws-dict-chs-utf8.tar.bz2
tar xvjf scws-dict-chs-gbk.tar.bz2
tar xvjf scws-dict-chs-utf8.tar.bz2

配置 Zhparser¶

# 下载 Zhparser 源代码
git clone https://github.com/amutu/zhparser.git
# 进入下载后的目录
cd zhparser
# 编译并安装
SCWS_HOME=/usr/local/scws make && make install

Note

自 Mattermost 6.0 起,官方已不再使用 mattermost/mattermost-prod-db 作为数据库镜像,你可以直接使用安装在服务器上的 PostgreSQL 数据库,或者使用 PostgreSQL 官方的 Docker 镜像。

如果使用 Docker 镜像作为数据库,可以预先执行以下命令,安装依赖(请根据实际的 PostgreSQL 版本选择)。

# 更新本地缓存
apt update
# 配置 SCWS 时需要的依赖
apt install wget make gcc
# 配置 Zhparser 时需要的依赖
apt install git postgresql-server-dev-13

创建 extension 并增加解析配置¶

-- 创建 extension
CREATE EXTENSION zhparser
-- 创建 text search configuration
CREATE TEXT SEARCH CONFIGURATION simple_zh_cfg (PARSER = zhparser);
-- 配置 token mapping
ALTER TEXT SEARCH CONFIGURATION simple_zh_cfg ADD MAPPING FOR n,v,a,i,e,l WITH simple;

更新 PostgreSQL 配置¶

将 postgresql.conf 中的 default_text_search_config 的值更改为 simple_zh_cfg。

更改后,需要重启数据库方可生效。

Note

配置完成后,需根据 Mattermost 官方仓库中的 SQL 建表语句重新创建索引,方可正式启用中文语言的全文搜索功能。

未尽事宜,可以参考以下链接:

  • SCWS 官方文档

  • Zhparser 官方文档

  • Mattermost 建表语句

日本語 / Japanese¶

日本語翻訳の改善は大歓迎です。自由に変更していただいて結構です。

検索設定¶

Mattermost で日本語検索をするためにはデータベースの設定変更が必要です

  • MySQL

  • Postgres

日本語(CJK)検索設定のドキュメントの改善にご協力ください

ガイド¶

Qiita上で Mattermost のインストールおよび構成のガイドを提供しています。詳細については、こちら をご覧ください。

한국어 / Korean¶

이 문제에 대한 논의는 이 이슈 에서 시작되었습니다.

한국어 버전 이용 시 문제점을 발견하면 Localization 채널 또는 한국어 채널 에서 의견을 제시할 수 있습니다.

검색을 위한 데이터베이스 설정¶

PostgreSQL: PostgreSQL 데이터베이스에서는 따로 설정이 필요하지 않습니다.

MySQL: MySQL에서는 전문 검색(Full-text search) 기능에 제한이 있기 때문에 추가적인 작업이 필요합니다.

MySQL 해결 방법¶

  1. n-gram parser 를 이용하기 위해서는 MySQL의 버전이 5.7.6 이상이어야 합니다.

  2. MySQL의 구성 파일에서 n-gram의 최소 토큰 크기를 다음과 같이 설정합니다.

[mysqld]
ft_min_word_len = 2
innodb_ft_min_token_size = 2
  1. 데이터베이스를 재시작합니다. (이 과정은 반드시 필요합니다.)

  2. 일부 테이블의 전문 검색 색인을 다음과 같이 재구성합니다.

  • 게시물 검색을 위한 설정 ( 참조 )

DROP INDEX idx_posts_message_txt ON Posts;
CREATE FULLTEXT INDEX idx_posts_message_txt ON Posts (Message) WITH PARSER ngram;
  • 해시 태그 검색을 위한 설정 ( 참조 )

DROP INDEX idx_posts_hashtags_txt ON Posts;
CREATE FULLTEXT INDEX idx_posts_hashtags_txt ON Posts (Hashtags) WITH PARSER ngram;
  • 사용자 검색을 위한 설정

    Users.idx_users_txt_all 과 Users.idx_users_names_all 을 n-gram 없이 재구성합니다.

Tell us more!

Your feedback helps us improve the Mattermost product documentation.

How can we make this page more helpful?

0/186

Have a feature request? Share it here.

Having issues? Join our Community server.

×
Thank you!

We appreciate your feedback.

Did you find what you were looking for?

😀

Yes

😐

Mostly

🙁

No!

Next
SSL client certificate setup
Previous
Email templates
Copyright © 2015-2026 Mattermost
Made with Sphinx and @pradyunsg's Furo
On this page
  • Chinese, Japanese and Korean search
    • 中文 / Chinese
      • 配置 SCWS
      • 配置 Zhparser
      • 创建 extension 并增加解析配置
      • 更新 PostgreSQL 配置
    • 日本語 / Japanese
      • 検索設定
      • ガイド
    • 한국어 / Korean
      • 검색을 위한 데이터베이스 설정
      • MySQL 해결 방법