Mattermost Peer-to-Peer Forum

Can not search channel by text


#1

When I try to select a team with the CTRL+K key, even if I enter a character on the appearance search form, the circular dialog keeps going forever and the extraction result is not displayed.

I am Japanese and I use 2-byte characters mainly. I will not extract team registered with 1byte characters even if I search by 1byte character. For example, if a channel name is created as “ABC”, I will not be extracted even if I search by “ABC”.

This can not be done by Mac version application, Windows version application, or each Web browser operation.

How can I make a channel searchable?


Mattermost 5.8.0, MariaDB 10.2.21, CentOS 7.6, Nginx 1.14.1


#2

Hi @Babbles,

I think the Ctrl + K shortcut is for channel search/selection: https://docs.mattermost.com/help/messaging/keyboard-shortcuts.html.

Were you referring to channel search?


#3

Apparently it was not only there that I can not search.
In addition to the channel switching search form, I can not search even the search form when searching for the channel (name).
In the search form when add members to the team and add members to the channel, I was able to do a search. I’m also searching for posts.

It is a big difference whether I use 2 byte characters or not. The channel name may be 1 byte characters or 2 byte characters.

How can I search for channel names and team names?

*I changed the title of this topic.


#4

Hi, @Babbles

Since you are Japanese and mentioned about the usage of 2-byte characters, I was wondering if you initially included the following configuration during the deployment of database that Mattermost is using on your end. The reason why I would like to check on this is due to the caveat in the documentation here - Database Software:

Deployments requiring searching in Chinese, Japanese and Korean languages require MySQL 5.7.6+ and the configuration of ngram Full-Text parser. For searching two characters, you will also need to set ft_min_word_len and innodb_ft_min_token_size to 2 and restart MySQL. See CJK discussion for details.

Since you are using MariaDB instead (we had a discussion to have it officially supported as per here initially), it will be helpful if you can provide screen shot(s) so we can get a clearer picture on the current issue that we are discussing here. Additionally, what charset / collation did you use for the database?

Also, can I also confirm what do you actually mean by searching for team name? As conversations are mainly divided to public / private channels and direct messages, are you referring to channels as teams? Keep us posted.


#5

I introduced Mroonga/Groonga for Japanese search. I am recreating the index below.

MariaDB > ALTER TABLE `Channels` ENGINE = Mroonga;
MariaDB > ALTER TABLE `Posts` ENGINE = Mroonga;

When introducing them, I was specifying “1” as the following values let me specify “1” on the site I referred to them.

ft_min_word_len and innodb_ft_min_token_size

I have changed them to “2” this time. Then I input the search word and delete the one character from the end of the search term, the result is extracted. Can I make it possible to search without deleting characters?

I can search for postings in Japanese as well. I can not search for only channels.

utf8mb4_general_ci

I’m sorry. It was a channel name, not a team.


#6

Hi, @Babbles.

No worries and thank you for the clarification. As per your statement here, it seems that the Channel search is working though it requires you to delete the character:

Since it does work for Posts normally (assuming that MariaDB was restarted after all the changes were made), I would like to understand the differences between these 2 tables here. Can you please run the following command on your SQL terminal and provide the outputs?

SHOW TABLE STATUS WHERE Name = "Channels"\G
SHOW TABLE STATUS WHERE Name = "Posts"\G

If they are the same, there might be a potential bug specific to the Channel search though it is yet to be fully confirmed.


#7

It is an execution result.
SHOW TABLE STATUS WHERE Name = “Channels”\G;

*************************** 1. row ***************************
           Name: Channels
         Engine: Mroonga
        Version: 10
     Row_format: Dynamic
           Rows: 32
 Avg_row_length: 0
    Data_length: 136761344
Max_data_length: 0
   Index_length: 0
      Data_free: 0
 Auto_increment: NULL
    Create_time: NULL
    Update_time: NULL
     Check_time: NULL
      Collation: utf8mb4_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
1 row in set (0.00 sec)

ERROR: No query specified

SHOW TABLE STATUS WHERE Name = “Posts”\G;

*************************** 1. row ***************************
           Name: Posts
         Engine: Mroonga
        Version: 10
     Row_format: Dynamic
           Rows: 376
 Avg_row_length: 0
    Data_length: 196304896
Max_data_length: 0
   Index_length: 0
      Data_free: 0
 Auto_increment: NULL
    Create_time: NULL
    Update_time: NULL
     Check_time: NULL
      Collation: utf8mb4_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
1 row in set (0.00 sec)

ERROR: No query specified