Add Tokenizer Mode Support for Message Search#31540
Conversation
75bba9f to
3ea2396
Compare
|
@shinaoka seems like you have lint & insufficient test coverage issues |
|
I have managed to fix the CI errors! |
|
Blocked on matrix-org/seshat#150 |
|
Thanks for the contribution @shinaoka , this seems like a very valuable one. |
|
Should I proceed? @langleyd |
|
Looks like this is an improvement for users -- thank you for the contribution, and thank you for your patience. From a product perspective, we think in the future we might be able to make search a much better experience but I don't want to hold off on this change waiting for that future... So let's move ahead here but know that we may choose to update the Search UI & UX in the future 🙏 |
Rebased onto latest develop with monorepo directory structure (apps/web/). - Add tokenizer mode setting (Standard/Japanese) in Message Search preferences - Pass tokenizer mode to Seshat via element-desktop IPC - Add confirmation dialog when changing tokenizer mode (requires reindex) - Add tests for tokenizer mode functionality Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5c57ad1 to
ca56669
Compare
|
Converting to draft while element-hq/element-desktop#2753 is outstanding so it doesn't end up in our review queue :) |
|
Updated this PR with a fix for the tokenizer-change flow in element-web and added a regression test. This is still waiting on the element-desktop and seshat side changes. |
|
Since element-desktop has been merged into element-web (monorepo), I've prepared a new branch (
Would it be OK to open a new PR from that branch to replace this one? This would keep everything in a single PR and avoid merging ~3500 commits of drift into this branch. I'll reference this PR and its discussion in the new one. |
|
Sounds good, thanks |
|
I forgot to make it ready for review... |
| @@ -0,0 +1,60 @@ | |||
| /* | |||
| Copyright 2024 New Vector Ltd. | |||
There was a problem hiding this comment.
This should be your copyright, with the present year
| Copyright 2025 New Vector Ltd. | ||
| Copyright 2020, 2021 The Matrix.org Foundation C.I.C. |
| @@ -0,0 +1,195 @@ | |||
| /* | |||
| Copyright 2025 New Vector Ltd. | |||
| Copyright 2025 New Vector Ltd. | ||
| Copyright 2020, 2021 The Matrix.org Foundation C.I.C. |
| Copyright 2025 New Vector Ltd. | ||
| Copyright 2020, 2021 The Matrix.org Foundation C.I.C. |
| Copyright 2025 New Vector Ltd. | ||
| Copyright 2020, 2021 The Matrix.org Foundation C.I.C. |
| "RoomList.showMessagePreview": IBaseSetting<boolean>; | ||
| "RightPanel.phasesGlobal": IBaseSetting<IRightPanelForRoomStored | null>; | ||
| "RightPanel.phases": IBaseSetting<IRightPanelForRoomStored | null>; | ||
| "enableEventIndexing": IBaseSetting<boolean>; | ||
| "crawlerSleepTime": IBaseSetting<number>; | ||
| "tokenizerMode": IBaseSetting<string>; |
There was a problem hiding this comment.
Should this not be "language" | "ngram"?
|
Please include some screenshots in the PR of the new UI/modals |
|
I have posted some screenshots in the new PR: Let me close this PR in favor of the new one. |
Summary
This PR adds a user-facing setting to choose the tokenizer mode for local message search. N-gram tokenization is essential for languages without clear word boundaries such as Japanese, Chinese, and Korean (CJK languages).
Changes
Dependencies
Merge Order
Checklist
public/exportedsymbols have accurate TSDoc documentation.