Page MenuHomePhabricator

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

Authored by inka on Mar 31 2023, 2:23 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 28, 1:04 AM
Unknown Object (File)
Thu, Mar 28, 12:55 AM
Unknown Object (File)
Mar 9 2024, 5:01 AM
Unknown Object (File)
Mar 8 2024, 1:39 AM
Unknown Object (File)
Mar 8 2024, 1:38 AM
Unknown Object (File)
Mar 7 2024, 1:10 PM
Unknown Object (File)
Mar 7 2024, 12:20 PM
Unknown Object (File)
Mar 7 2024, 10:27 AM
Subscribers

Details

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)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

inka edited the test plan for this revision. (Show Details)
inka requested review of this revision.Mar 31 2023, 2:39 AM

This looks ok, but we should also update the databases in our local environments. Do we have a plan for this?

This revision is now accepted and ready to land.Mar 31 2023, 5:38 AM
In D7266#216296, @tomek wrote:

This looks ok, but we should also update the databases in our local environments. Do we have a plan for this?

D7296 addresses this