Mattermost
  • About Mattermost
    • Mattermost overview
      • The Mattermost platform
      • Collaboration workflows addressed by Mattermost
      • About the Mattermost open source project
    • Security overview
      • Security features
      • Security updates
      • Security policies
      • HIPAA compliance*
      • FINRA compliance*
    • Integrations overview
      • Custom Apps
      • API
      • Plugins
      • Bots
      • Custom slash commands
      • Webhooks
      • Interactive messages
      • CLI
      • Zapier
      • Source code customizations
    • Subscription overview
      • General frequently asked questions
    • Self-hosted subscriptions
      • Purchase a subscription
      • View subscription information
      • Add more users to a subscription
      • Renew a subscription
    • Cloud subscriptions
      • Purchase a Cloud subscription
      • View subscription details
      • Add more users to your subscription
      • Renew your subscription
      • Frequently asked questions
    • Mattermost editions and offerings
      • Self-hosted editions
      • Mattermost offerings
      • Mattermost Free
      • Mattermost Professional
      • Mattermost Enterprise
      • Other Mattermost offerings
      • Packaging decisions
    • Corporate directory integration
      • Basic authentication
      • Security features for authentication
      • Active Directory/LDAP authentication
      • Authentication options outside of a private network
      • Future authentication methods
    • Certifications and compliance overview
      • GDPR compliance
      • Accessibility compliance
      • U.S. trade compliance
      • U.S. export compliance overview
      • Frequently asked questions
    • Frequently asked questions (FAQ)
      • General Mattermost questions
      • Community questions
      • Notifications
      • Video, audio, and screen sharing
      • Enterprise questions
      • Mattermost source available license
      • Integrations
      • Use cases
      • Product questions
      • High trust questions
      • Design decisions
      • Business questions
      • Illicit use
  • Get Started with Mattermost
    • 1 - Setup Mattermost
      • :cloud: Sign-up to Mattermost Cloud
      • :computer: Install Self-Hosted Mattermost
    • :wave: 2 - Invite Users
    • :tada: 3 - Try out the suite
    • :raising_hand: 4 - Consider joining the Mattermost community
  • :construction_worker: Install Guide
    • :floppy_disk: Server Installation
      • Most Popular Self-Hosted Installation Guides:
      • Additional Self-Hosted Installation Guides:
    • :pager: Desktop and Mobile App Installation
    • :crystal_ball: Troubleshooting
  • :trolleybus: Upgrade Guide
    • :trolleybus: Deployment Guide
      • Server deployment
  • Mattermost administration
    • The basics
      • Optimize your workspace
      • Mattermost configuration settings
      • Mattermost deprecated configuration settings
      • Workspace configuration for Cloud deployments
      • Advanced permissions
      • Guest accounts
      • System Admin roles
      • OpenID
      • Google SSO
      • Office 365 SSO
      • GitLab SSO
      • Multi-factor authentication
      • Active Directory/LDAP
    • Cloud admin
      • Workspace setup and configuration
      • Workspace management
      • Workspace compliance
    • Self-hosted admin
      • Self-hosted setup and configuration
      • Self-hosted server management
      • Self-hosted compliance
    • Other resources
      • Converting OAuth 2.0 service providers to OpenID Connect
      • Generate a support packet
      • mmctl command line tool
      • Migration announcement email template
      • Advanced permissions: Backend infrastructure
      • Command line tools
      • Scripts
  • Welcome to Mattermost
    • Access your Mattermost workspace
      • Sign in to Mattermost
      • Keyboard shortcuts
      • Log out of Mattermost
    • Mattermost basics
      • Get started with Mattermost Channels
      • Get started with Mattermost Playbooks
      • Get started with Mattermost Boards
      • Manage custom groups
      • About teams
      • Team settings
      • Team keyboard shortcuts
      • About user roles
    • Customize your Mattermost experience
      • Manage your Mattermost profile
      • Set your status and availability
      • Customize your Mattermost theme
      • Customize your Desktop App experience
      • Manage Desktop App server connections
    • Interface changes in v6.0
      • What changed in Mattermost v6.0?
  • Mattermost Channels
    • Channels, messages, and conversations
    • Work with channels
      • Channel types
      • Create channels
      • Channel naming conventions
      • Rename a channel
      • Convert public channels to private
      • Join and leave channels
      • Manage channel members
      • Find channels
      • Navigate between channels
      • Mark channels as favorites
      • Customize your channel sidebar
      • Archive and unarchive channels
      • Set Channel preferences
      • Channels settings
    • Work with messages
      • Send messages
      • Reply to messages
      • Organize conversations
      • React to messages using emojis
      • Mention people
      • Mark messages as unread
      • Format messages
      • Share files in messages
      • Share links to messages
      • Save and pin messages
      • Search for messages
    • Keyboard accessibility
      • Keyboard accessibility in Channels
      • Keyboard shortcuts for Channels
      • Run slash commands
    • Extend Channels functionality
      • Extend functionality with integrations
  • Mattermost Playbooks
    • The basics
      • Overview
      • Access playbooks
      • Plan playbooks
      • Run playbooks
      • Notifications and updates
      • Retrospectives
  • Mattermost Boards
    • The basics
      • Overview
      • Enable Boards
      • Access Boards
      • Work with boards
      • Work with cards
      • Share boards
      • Migrate to Boards
      • Templates
  • Mattermost for developers
  • Get help with Mattermost
  • Community chat
Mattermost
  • Docs »
  • Mattermost administration guide »
  • Chinese, Japanese, and Korean search
  • Search
    Edit

Chinese, Japanese, and Korean search 

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.

Contents

  • Chinese, Japanese, and Korean search

    • 中文 / Chinese

      • 编译scws

      • 编译zhparser

      • 创建extension以及增加解析配置

      • 设置postgresql

      • 调试

    • 日本語 / Japanese

      • 検索設定

      • ガイド

    • 한국어 / Korean

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

      • MySQL 해결 방법

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

中文 / Chinese 

数据库版本请参考: 配置要求 。 其中MySQL的ngram配置可以参考 Cannot search CJK contents 。

更多中文相关问题讨论请访问 中文讨论组 。

以Ubuntu 14.04 PostgreSQL 9.3 数据库 mattermost 为例。

编译scws 

wget -q -O - http://www.xunsearch.com/scws/down/scws-1.2.2.tar.bz2 | tar xjf -
cd scws-1.2.2
./configure
make install

编译zhparser 

sudo apt-get install --yes postgresql-server-dev-9.3 libpq-dev
git clone https://github.com/amutu/zhparser.git
SCWS_HOME=/usr/local make && make install

Note

通过 Docker 镜像(mattermost/mattermost-prod-db)应用数据库的用户,请按照下述方法安装依赖项。

# Alpine 通过 apk add 命令安装依赖项
apk add wget tar gcc git postgresql-dev

创建extension以及增加解析配置 

sudo -i -u postgres
psql mattermost -c 'CREATE EXTENSION zhparser'
psql mattermost -c 'CREATE TEXT SEARCH CONFIGURATION simple_zh_cfg (PARSER = zhparser);'
psql mattermost -c 'ALTER TEXT SEARCH CONFIGURATION simple_zh_cfg ADD MAPPING FOR n,v,a,i,e,l WITH simple;'

设置postgresql 

将 /etc/postgresql/9.3/main/postgresql.conf 中 default_text_search_config 的值更改为 simple_zh_cfg,然后重启postgresql: sudo service postgresql restart

调试 

可以打开 mattermost 的配置 config/config.json 中 SqlSettings 的设置 Trace: true,然后可以在mattermost的标准输出看到执行的SQL语句。

SELECT to_tsvector('simple_zh_cfg', '开始全面整修道路');
SELECT to_tsvector('simple_zh_cfg', '开始全面整修道路') @@ to_tsquery('simple_zh_cfg', '全面');
SELECT * FROM Posts WHERE Message @@ to_tsquery('simple_zh_cfg', '全面');

日本語 / 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 없이 재구성합니다.

Next Previous

© Copyright 2015-2022 Mattermost.

Built with Sphinx using a theme provided by Read the Docs.
  Options 
Contribute
Report a Problem
Edit on GitHub
×
We're hiring!
Mattermost Logo
  • Platform
    Channels Learn More
    Playbooks Learn More
    Boards Learn More
    • Product Overview
    • Integrations
    • Security
  • Solutions
    Solutions Overview Read More

    USE CASES

    • Secure Collaboration
    • DevOps
    • Workflow Orchestration
    • Incident Resolution
    • CI/CD
    • Test/QA
    • IT Service Desk
    • APM/NPM
    Solutions Overview »

    INDUSTRIES

    • Government
    • Financial Services
    • Media & Entertainment
    • Legal
    • Healthcare
  • Pricing
  • Developers
    Deploy Run Your Server Now
    Integrate Learn More
    Contribute Learn More
    • Blog
    • Resources
    • Community
    • Docs
    • API Reference
    • Release Notes
  • Customers
  • Login
    My Workspace Login
    My Account Login
    Apps Download
    Support Help Center
  • Free Trial
  • Contact Sales