×
Hacktoberfest is here! Contribute, collaborate & earn rewards.
  • 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 mode
Mattermost documentation
Mattermost documentation
  • About Mattermost
    • Mattermost overview
    • Use cases
      • Maximize your Microsoft investment
      • Secure command and control
      • DevOps collaboration
      • Incident response collaboration
    • Security overview
    • Integrations overview
    • Subscription overview
      • Cloud subscriptions
        • Cloud Dedicated
        • Cloud Shared
        • Cloud VPC Private Connectivity
      • Self-hosted subscriptions
      • Editions and offerings
    • Releases and life cycle
      • Release policy
      • Server
        • Server releases
        • v10 changelog
        • v9 changelog
        • Unsupported legacy releases
        • Version archive
      • Desktop
        • Desktop releases
        • Desktop app changelog
      • Mobile
        • Mobile releases
        • Mobile apps changelog
      • Removed and deprecated features
    • Corporate directory integration
    • Certifications and compliance overview
    • Frequently asked questions (FAQ)
      • General Mattermost questions
      • Community questions
      • Notifications questions
      • Video, audio, and screen sharing questions
      • Enterprise questions
      • License questions
      • Integration questions
      • Use cases
      • Product questions
      • High trust questions
      • Design decision questions
      • Business questions
      • Illicit use questions
  • Deploy Mattermost
    • Migrate from MySQL to PostgreSQL
      • Automate PostgreSQL migration
      • Manually migrate to PostgreSQL
    • Prepare your Mattermost database
    • Deploy on Ubuntu
    • Deploy using Docker
    • Deploy with a tarball
    • Deploy using Omnibus
    • Deploy using Kubernetes
    • Deploy on Red Hat
    • Set up an NGINX proxy
    • Set up TLS
    • Prepare for your Mattermost deployment
      • Software and hardware requirements
      • Manage the Mattermost Kubernetes Operator
      • Administrator tasks
      • Architecture overview
      • Plan your Mattermost implementation
      • Enterprise roll out checklist
      • Welcome email template
    • Deployment guides
      • Server deployment
        • Deployment overview
        • Set up a socket-based Mattermost database
        • Image proxy
        • Backup and disaster recovery
        • Encryption options
        • Configure transport encryption
          • Configuring proxy to Mattermost transport encryption
          • Configuring database transport encryption
          • Configuring cluster transport encryption
        • Bleve search
        • Trial Mattermost using Docker
      • Desktop and mobile app deployment
        • Desktop app deployment guide
        • Desktop MSI installer and group policy installation guides (Beta)
        • Desktop App custom dictionaries
        • Desktop managed resources
        • Using Mattermost’s pre-built mobile apps
        • Testing push notifications
        • Deploy Mattermost mobile apps
        • Mobile push notifications
        • Building and distributing your own custom Mattermost mobile apps
        • Deploying mobile apps using an EMM provider
        • AppConfig for EMM solutions with Mattermost Mobile Apps
        • Mobile VPN options
        • Mobile apps FAQ
        • Client-side data storage FAQ
    • Upgrade Mattermost
      • Important upgrade notes
      • Prepare to upgrade Mattermost
      • Upgrade Mattermost Server
      • Enterprise install and upgrade
      • Install a license key
      • Downgrade Mattermost Server
    • Scale Mattermost
      • Scale for Enterprise
      • 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
      • High availability cluster-based deployment
      • Elasticsearch
      • Collect performance metrics
      • Deploy Prometheus and Grafana for performance monitoring
      • Performance monitoring metrics
      • Mattermost performance alerting guide
      • Ensuring releases perform at scale
    • Deployment troubleshooting
      • General troubleshooting
      • Troubleshooting your high scale deployment
      • Troubleshooting mobile applications
      • PostgreSQL installation troubleshooting
      • MySQL installation troubleshooting
    • Additional server installation guides
      • Deploy Mattermost on Bitnami
      • AWS Elastic Beanstalk Docker setup
      • SMTP email setup
      • Install Mattermost Team Edition in GitLab Helm Chart
      • Open source components
  • Manage Mattermost
    • Get started
      • Mattermost feature labels
      • Optimize your workspace
      • Mattermost configuration settings
      • Self-hosted edition and license
      • Cloud subscription, billing, and account
      • Reporting configuration settings
      • User management configuration settings
      • Environment configuration settings
      • Site configuration settings
      • Authentication configuration settings
      • Plugins configuration settings
      • Enable Copilot
      • Manage user surveys
      • Integrations configuration settings
      • Compliance configuration settings
      • Experimental configuration settings
      • Deprecated configuration settings
      • Environment variables
      • Provisioning workflows
      • Multi-factor authentication
      • Active Directory/LDAP
      • GitLab SSO
      • OpenID SSO
      • Google SSO
      • Entra ID SSO
      • Advanced permissions
      • Delegated granular administration
      • Manage team and channel members
      • Custom branding tools
      • Export channel data
      • eDiscovery
      • Compliance monitoring
      • Compliance export
      • Legal hold
      • Data retention tools
      • Custom terms of service
      • Notify Admin
      • AD/LDAP groups
      • Use AD/LDAP synchronized groups to manage team or private channel membership
      • Guest accounts
      • SAML Single Sign-On
        • 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
        • Keycloak SAML Configuration
      • SAML Single-Sign-On: technical documentation
      • Shared channels
      • Statistics
      • In-product notices
      • User satisfaction surveys
      • System-wide notifications
      • Bulk export tool
    • Cloud workspace management
      • Workspace migration
      • Cloud data residency
      • Cloud IP Filtering
      • Cloud Bring Your Own Key (BYOK)
    • Self-hosted administration
      • Mattermost self-hosted billing
      • Mattermost error codes
      • Request a server Health Check
      • Store configuration in your database
      • Bulk loading data
      • SMTP email setup
      • Email templates
      • Calls self-hosted deployment
      • Network Requirements for Calls Deployment
      • Configure CloudFront to host static assets
      • Use an outbound proxy
      • Migration guide
      • Migrate from Slack
      • Chinese, Japanese, and Korean search
      • Customize Mattermost
      • Mattermost logging
      • JSON audit log schema
      • SSL client certificate setup
      • Certificate-based authentication
      • Manage telemetry
      • Configure health check probes
    • Other resources
      • Convert OAuth 2.0 providers to OpenID Connect
      • Generate a support packet
      • mmctl command line tool
      • Migration announcement email template
      • Advanced permissions infrastructure
      • Command line tools
  • Use Mattermost
    • Connect and collaborate
      • Access your Mattermost workspace
        • Install the desktop app
        • Install the iOS mobile app
        • Install the Android mobile app
        • Log out of Mattermost
      • Organize using teams
        • Team settings
        • Team keyboard shortcuts
      • Organize using custom user groups
      • Invite people
      • Learn about Mattermost roles
      • Collaborate within channels
        • Channel types
        • Channel naming conventions
        • Communicate a channel's focus and scope
        • Create channels
        • Rename channels
        • 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
        • 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
        • Format messages
        • Set message priority
        • Mention people
        • Share files in messages
      • Collaborate within Microsoft Teams
      • Chat with Copilot
      • Keyboard shortcuts
        • Keyboard accessibility
        • Run slash commands
        • Built-in-slash-commands
      • Extend Mattermost with integrations
    • Build repeatable processes
      • 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
    • Customize your preferences
      • Manage your 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 calls preferences
      • Customize your desktop app experience
      • Connect to multiple workspaces
  • Integrate and extend
    • GitHub interoperability
    • GitLab interoperability
    • Jira interoperability
    • Mattermost Playbooks for Microsoft Teams
    • Microsoft Calendar interoperability
    • Microsoft Teams interoperability
    • Microsoft Teams Meetings interoperability
    • ServiceNow interoperability
    • Zoom interoperability
  • Develop with Mattermost
  • Get help with Mattermost
  • Join our community
  • Learn how we work
  • Contribute to this documentation
Back to top
Edit this page

Chinese, Japanese and Korean search#

plans-img Available on all plans

deployment-img self-hosted deployments

Enabling search for Chinese, Japanese and Korean (CJK) requires special configuration, since these languages do not contain spaces.

See database requirements documentation 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_word_len = 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
Customizing Mattermost
Previous
Migrate from Slack
Copyright © 2015-2024 Mattermost
Made with Sphinx and @pradyunsg's Furo
On this page
  • Chinese, Japanese and Korean search
    • 中文 / Chinese
      • 配置 SCWS
      • 配置 Zhparser
      • 创建 extension 并增加解析配置
      • 更新 PostgreSQL 配置
    • 日本語 / Japanese
      • 検索設定
      • ガイド
    • 한국어 / Korean
      • 검색을 위한 데이터베이스 설정
      • MySQL 해결 방법