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
      • Source code customizations
    • Subscription overview
      • Mattermost Nonprofit License program
      • Mattermost educational license program
      • Frequently asked questions
    • Self-hosted subscriptions
      • Buy a subscription
      • View subscription information
      • Add more users to your subscription
      • Quarterly true-up report
      • Renew your subscription
    • Cloud subscriptions
      • Buy a Cloud subscription
      • View subscription information
      • Billing period
      • Failed or late payments
      • Add more users to your Cloud Professional subscription
      • Renew your subscription
      • Frequently asked questions
    • Mattermost editions and plans
      • Self-hosted editions
      • Mattermost plans
      • Mattermost Free
      • Mattermost Professional
      • Mattermost Enterprise
      • Limits
      • Other Mattermost plans
      • Product 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
      • License questions
      • Integrations
      • Use cases
      • Product questions
      • High trust questions
      • Design decisions
      • Business questions
      • Illicit use
  • Deploy Mattermost
    • Deploy Mattermost for production use
    • Prepare for your Mattermost deployment
      • Preview Mattermost via Docker
      • Administrator tasks
      • Architecture
      • Implement Mattermost
      • Enterprise roll out checklist
      • Welcome email template
    • Install guides
      • Server installation
      • Desktop and Mobile App installation
    • Deployment guide
      • Server deployment
      • Desktop and Mobile App deployment
    • Upgrade Mattermost
      • Prepare to upgrade Mattermost
      • Upgrade Mattermost Server
      • Enterprise install and upgrade
      • Install a license key
      • Release definitions
      • Important upgrade notes
      • Release lifecycle
      • Extended Support Release
      • Downgrade Mattermost Server
      • Version archive
    • Scale Mattermost
      • Scale for Enterprise
      • High availability cluster
      • Elasticsearch
      • Performance monitoring
      • Mattermost performance alerting guide
    • Troubleshooting guides
      • General troubleshooting
      • Troubleshooting mobile applications
      • MySQL installation troubleshooting
    • Changelogs
      • Mattermost self-hosted
      • Mattermost legacy self-hosted
      • Mattermost Cloud
      • Mobile apps
      • Desktop apps
      • Deprecated features
    • Additional server install guides
      • Install on Ubuntu 18.04 LTS
      • Install on RHEL 7
      • Deploy Mattermost on Bitnami
      • AWS Elastic Beanstalk Docker setup
      • Install Mattermost Team Edition in GitLab Helm Chart
      • Open source components
  • Mattermost administration
    • Get started
      • 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
      • 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
      • Office 365 SSO
      • Advanced permissions
      • System admin roles
      • Manage team and channel members
      • Custom branding tools
      • eDiscovery
      • Compliance monitoring
      • Compliance export
      • Data retention tools
      • Custom terms of service
      • Notify Admin
      • Advanced user management
      • Advanced workspace management
    • Cloud workspace management
      • Mattermost Cloud billing
      • Workspace limits
      • Workspace usage
      • Workspace migration
      • Cloud data residency
    • Self-hosted administration
      • Mattermost self-hosted billing
      • Store configuration in the database
      • Bulk loading data
      • SMTP email setup
      • Email templates
      • Calls deployment
      • Configure CloudFront to host static assets
      • Use an outbound proxy
      • Migration guide
      • Chinese, Japanese, and Korean search
      • Customize Mattermost
      • Audit logging
      • JSON audit log schema
      • SSL client certificate setup
      • Certificate-based authentication
      • Manage telemetry
    • 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
  • Welcome to Mattermost
    • Access your Mattermost workspace
      • Log 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
      • Add people to your workspace
      • About insights
    • Customize your Mattermost experience
      • Manage your Mattermost profile
      • Set your status and availability
      • Customize your Mattermost theme
      • Customize your desktop app experience
      • Manage multiple app server connections
    • Mattermost interface changes
      • What changed in Mattermost v7.0?
      • What changed in Mattermost v6.0?
      • What changed in Mattermost Boards
  • 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
      • Start a call
      • Manage channel members
      • Browse channels
      • Navigate between channels
      • Mark channels as favorites
      • Mark channels as unread
      • Customize your channel sidebar
      • Archive and unarchive channels
      • Set channel preferences
      • Channels settings
      • Interact with channels
    • Work with messages
      • Send messages
      • Set message priority
      • Reply to messages
      • Organize conversations
      • React to messages using emojis
      • Mention people
      • Mark messages as unread
      • Format messages
      • Share files in messages
      • Forward 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
    • Overview
      • What’s a playbook?
      • What’s a run?
      • Keywords
      • Welcome message
      • Tasks and checklists
      • Status updates
      • Retrospective
    • Work with playbooks
      • Templates
      • Edit a playbook
      • Make checklists
      • Multiple runs in a channel
      • Status updates
      • Keywords
      • Actions
      • Run metrics
      • Webhooks
    • Work with runs
      • Follow and participate
      • View run details
      • Runs and channel behavior
      • Send outgoing webhooks
    • Work with tasks
      • Tasks and due dates
      • Task inbox
    • Work with notifications and updates
      • Status updates
      • Request an update
      • Follow runs and playbooks
      • Daily digest
      • Playbook to do
    • Work with metrics and goals
      • Configure retrospectives before a run
      • Metrics
    • Share and collaborate
      • Playbook roles
      • Playbooks permissions
      • Restrict who can create playbooks
    • Interact with playbooks
      • Slash commands
      • API documentation
  • Mattermost Boards
    • Overview
      • What’s a board?
      • What’s a card?
      • Access your boards
      • Focalboard personal server
    • Work with boards
      • Add new boards
      • Choose a board template
      • Edit board templates
    • Work with cards
      • Card descriptions
      • Card properties
      • Add properties
      • Rename a property
      • Change a property type
      • Delete a property
      • Define a “Select” or “Multi-select” property
      • Toggle properties shown on a board
      • Attach files
      • Card badges
      • Comment on a card
      • Mention people
      • Receive updates
      • Search cards
      • Card templates
    • Work with views
      • Board view
      • Table view
      • Gallery view
      • Calendar view
    • Work with groups, filter, and sort
      • Group cards
      • Filters
      • Sorting cards
    • Work with calculations
    • Share and collaborate
      • Board permissions
      • Roles
      • Guest accounts
      • Share a board
      • Share cards on Channels
    • Import, export, and migrate
      • Import and export a board archive
      • Export to CSV
      • Import and export from other applications
      • Import from Asana
      • Import from Notion
      • Import from Jira
      • Import from Trello
      • Import from Todoist
    • Navigate boards
      • Link a board to a channel
      • Unlink a board from a channel
      • Sidebar categories
      • Drag and drop
      • Manage boards on the sidebar
      • Find a board
      • Team sidebar
    • Boards settings
      • Set language
      • Random emoji icons
      • Product tour
  • Mattermost for developers
  • Get help with Mattermost
  • Community chat
  • Mattermost Handbook
  • Contribute to this site
    • How to get started
    • First time contributor?
    • Where to find more information
Mattermost
  • Docs »
  • Mattermost administration guide »
  • Chinese, Japanese, and Korean search
  • Search
    Edit

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.

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
×
Learn how to streamline incident response with Mattermost & ServiceNow on February 16th »
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
  • Get Started
  • Contact Sales