-
Notifications
You must be signed in to change notification settings - Fork 0
pref: add fulltext index for bookmarkEntries.text
#382
base: main
Are you sure you want to change the base?
Conversation
bookmarkEntries.text
bookmarkEntries.text
bookmarkEntries.text
This comment was marked as outdated.
This comment was marked as outdated.
It seems we cannot search single character unless you can change server config Unfortunately, for CJK usage, it's very natural desire to look up with single character especially for beginner, so I might need to come up with some hack. EDIT: Okay, here is a workaround. Only works to search |
@@ -11,5 +11,6 @@ CREATE TABLE `bookmarkEntries` ( | |||
PRIMARY KEY (`id`), | |||
KEY `bookmarkEntries_userId_createdAt_key` (`userId`,`createdAt`), | |||
KEY `bookmarkEntries_videoId_key` (`videoId`), | |||
KEY `bookmarkEntries_captionEntryId_key` (`captionEntryId`) | |||
KEY `bookmarkEntries_captionEntryId_key` (`captionEntryId`), | |||
FULLTEXT KEY `text` (`text`) /*!50100 WITH PARSER `ngram` */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skeema put extra trailing space after magic comment.
It's a bit too annoying. Not sure if there's any workaround.
It feels very redundant but maybe to support single character search, we can add extra "multi valued" index https://dev.mysql.com/doc/refman/8.0/en/create-index.html#create-index-multi-valued |
todo