HomePhabricator
Diffusion Comm 9e1935167b70

[keyserver] Set innodb-ft-min-token-size and innodb-ft-enable-stopword variables

Tags
None
Referenced Files
F456759: image.png
Apr 7 2023, 6:21 AM
File Not Attached
F456758: image.png
Apr 7 2023, 6:21 AM
File Not Attached
Subscribers
None

Description

[keyserver] Set innodb-ft-min-token-size and innodb-ft-enable-stopword variables

Summary:
issue: https://linear.app/comm/issue/ENG-3349/test-setting-innodb-ft-min-token-size
innodb-ft-min-token-size sets the minimum length of words stored in an InnoDB FULLTEXT index. We set it to 1, because we want words of any length to be indexed.
innodb-ft-enable-stopword set to 0 tells innodb to not use its list of stopwords. We want to handle them ourselves in js, and just not insert them into the search table.

Test Plan:
Run keyserver in docker and checked that the variables are indeed set to those values (by connecting to the db and running SHOW VARIABLES LIKE 'innodb_ft%';). Added to the message_search table rows with words of length 1 and 2, and checked that MATCH AGAINST query finds them. Checked that innodb stopwords also match.

image.png (620×1 px, 68 KB)

image.png (802×1 px, 87 KB)

Reviewers: ashoat, tomek, jon

Reviewed By: tomek

Subscribers: atul

Differential Revision: https://phab.comm.dev/D7266