-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not search for Japanese word #2159
Comments
Hi @thinhduckhoi, If you're using MySQL please try changing the parser settings to better index for searching in Japanese. If you're using Postgres, please search for similar functionality? We'd highly appreciate your feedback on what you find works (or doesn't work). Alternatively, you can add |
Thank you, i could find the japanese string when adding * after it. |
Glad to hear your issue is sorted thinhduckhoi! |
FYI: How to enable Japanese sentences search on PotgreSQL My environment: CentOS7.2, GitLab Mattermost v2.1.0 Install necessary packages:
Intall Mecab and Mecab IPA-dictionary:
Install textsearch_ja:Site pgfoundry.org is down for several days, so I have used forked version.
Enable pg_catalog.japanese:
Edit parameter in data/postgresql.conf:Modify (* This is global setting, may have side-effets to GitLab.) Enable edited parameter:
default_text_search_config has effect when searching posted messages, because to_tsvector has no explicit paramter(refs 1, 2). On current version(v2.1.0), I guess the above is all. Install pg_bigm:
Edit setting in data/postgresql.conf:
Add in data/postgresql.conf: Re-create index using pg_bigm:
|
Thanks @yukihane! Highly appreciated, we've included a link to your post from the documentation for the Japanese community. Would you be interested in contributing to the correction and translation of our guidance for Japanese language speakers? Here is a page that has used machine translation from English to Japanese: https://github.com/mattermost/docs/blob/master/source/install/i18n.rst With your help, I think we could improve support for the community. |
Just a note: It seems data/porgresql.conf is overwritten whenever gitlab-ctl reconfigure is run. |
I find the proposed approach to enable Japanese search as too complicated and risky on a production system, where PostgreSQL is also used by other services (ie. Gitlab). I would like to avoid changing the PostgreSQL configuration and compile libraries. I have learned about PGroonga (http://pgroonga.github.io/), which looks like a good solution. However, I'm not sure if this would be a practical solution here and which changes would be necessary. It would be great if PGroonga could be used if available and otherwise fall back to the default. |
Hello @dkastl I tried pgroonga but didn't work. I needed create index for message columun of posts table but its type is varying(4000). If you convert message columun's type from varchar to text, it may be able to use pgroonga. |
@morihaya , |
I tried to use the method proposed by @yukihane. Unfortunately, however, I failed at installing textsearch_ja with the following error.
The first japanese sentence means "No such a file or directory.", and the second is "There is no rule to make the target '/opt/gitlab/~~~~'. Cancel." How should I fix it? Currently, I use Gitlab 12.6.3-ce and bundled mattermost 5.17.1 on CentOS 7.7.1908. |
The recent version of mattermost bundled in Gitlab cannot use the method proposed by @yukihane as I described in the last post. However, mattermost introduced Bleve search engine as an experimental feature recently, and by enabling it, I cloud confirm that text search in Japanese worked. |
Hi everyone,
I'm running mattermost 1.4.0 on server with CentOS6.7 and docker version 1.7.1 installed.
The point is i was not be able to search Japanese word. Is there anyway to fix it?
The text was updated successfully, but these errors were encountered: