Summary
Postgres default_text_search_config was set to a new parser as outlined here https://docs.mattermost.com/install/i18n.html, but the actual MM text search still uses the default English parser.
Steps to reproduce
- Using the latest community version 5.22
- My install uses postgres and I just enabled the Chinese full text search following the steps outlined in the link above.
- I can verify from the postgres command line that the parser defined in default_text_search_config works correctly.
mattermost=# SELECT to_tsquery('保障房资金压力'); result: => to_tsquery '保障' & '房' & '资金' & '压力' (1 row)
- then I move to try the search in the MM UI, from the trace log it seems it still loaded the default English, notice the log here to_tsvector method toward the end
{"level":"debug","ts":1590501648.0632586,"caller":"sqlstore/supplier.go:125","msg":"sql-trace: SELECT * ,(SELECT COUNT(Posts.Id) FROM Posts WHERE q2.RootId = '' AND Posts.RootId = q2.Id AND Posts.DeleteAt = 0) as ReplyCount FROM Posts q2 WHERE DeleteAt = 0 AND Type NOT LIKE 'system_%' AND ChannelId IN ( SELECT Id FROM Channels, ChannelMembers WHERE Id = ChannelId AND (TeamId = $1 OR TeamId = '') AND UserId = $2 AND DeleteAt = 0 ) AND to_tsvector('english', Message) @@ to_tsquery('english', $3) ORDER BY CreateAt DESC LIMIT 100 [1:bueu4ri43b84bqe3twkc6izj3w 2:1z1dotz5wfrkxbaci1t6fg4oqc 3:(中文)] (15.90583ms)"}
Expected behavior
Expect the full text search should use the new parser that I defined
Observed behavior
see above