Mattermost
5.8
  • Overview
  • User's Guide
  • Administrator's Guide
    • Getting Started
    • Installing Mattermost
      • Software & Hardware Requirements
      • Installing on Ubuntu 16.04 LTS
      • Installing on Ubuntu 18.04 LTS
      • Installing on Debian Jessie
      • Installing on RHEL 6.6
      • Installing on RHEL 7.1
      • Installing on CentOS, Oracle Linux, and Scientific Linux
      • Enterprise Install and Upgrade
      • Deploy Mattermost on Bitnami
      • Local Machine Setup using Docker
      • Production Docker Deployment
      • AWS Elastic Beanstalk Docker Setup
      • Deploy Mattermost on Cloudron (Unofficial)
      • Installing Mattermost Team Edition in GitLab Helm Chart
      • Troubleshooting
      • Desktop Application Install Guides
      • SMTP Email Setup
      • Configuring CloudFront to host Mattermost static assets
      • Using an Outbound Proxy
      • Chinese, Japanese & Korean Search
        • 日本語 / Japanese
        • 中文 / Chinese
      • Configuring Apache2 (Unofficial)
    • Deployment
    • Configure Mattermost
    • Mobile Apps
    • Onboard Users
    • Administration
    • Upgrade Mattermost
    • Mattermost Integrations
    • Mattermost Compliance
    • Scaling Mattermost
    • Unofficial Enhancements
  • Integration Guide
  • Developer's Guide
  • Core Team Handbook
Mattermost
  • Docs »
  • Administrator’s Guide »
  • Chinese, Japanese & Korean Search
  • Edit

Chinese, Japanese & Korean Search¶

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

  • See database requirements documentation for how to setup search for these languages.

Contents

  • Chinese, Japanese & Korean Search
    • 日本語 / Japanese
      • 検索設定
      • ガイド
    • 中文 / Chinese
      • 编译scws:
      • 编译zhparser:
      • 创建extension以及增加解析配置:
      • 配置postgresql
      • 调试

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

日本語 / Japanese¶

改善された日本語の翻訳は大歓迎です。完全にここに書かれているものを交換すること自由に感じてください。

検索設定¶

MySQL: データベース構成に関する日本ご覧ください。ドキュメントを検索するにはMattermostを設定します

Postgres: ここでは、日本のために、より良い検索作業を行うための提案です

私たちは、検索に日本語ドキュメントの改善を手助けしてください

ガイド¶

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

中文 / Chinese¶

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

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

以Ubuntu 14.04 PosgreSQL 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', '全面');
Next Previous

© Copyright 2015-2019 Mattermost

Built with Sphinx using a theme provided by Read the Docs.
  Options 
Contribute
Report a Problem
Edit on GitHub
  • Developers
  • Product
  • Pricing
  • Docs
  • Blog
  • Download
  • Trial