ArkHost/HelixNotes
14
150
Fork
You've already forked HelixNotes
13

Issue: Chinese characters are not correctly indexed/searched in Helix Note #53

Closed
opened 2026年05月04日 07:30:44 +02:00 by Wang234 · 2 comments

Description
Currently, the search functionality in Helix Note does not handle Chinese text properly. It appears that sentences are being treated as single, continuous tokens (words) because Chinese does not use spaces between characters.

Steps to Reproduce
Create a note containing a Chinese sentence, for example: 这是一段测试文字 (This is a test sentence).

Attempt to search for a keyword in the middle of the sentence, such as 测试 (test).

Observe that the search fails to return the note.

Search for the very first character 这 (this), and the note will likely appear.

Expected Behavior
Search should be able to identify and match substrings within a Chinese sentence, regardless of whether the keyword starts at the beginning of the string.

Actual Behavior
The search only seems to work if the query matches the start of the "word." Since the entire sentence is identified as one long word due to the lack of spaces, mid-sentence searching is effectively broken.

Potential Cause
This is likely a tokenization issue. Many search engines or indexing libraries default to space-based delimiters. For Chinese, a character-based or N-gram tokenization approach is required to allow searching for characters or phrases within a continuous string of text.

Suggested Fix / Workaround
Implement a specialized tokenizer for CJK (Chinese, Japanese, Korean) characters.

Enable N-gram indexing to allow for partial matching within tokens.

Update the regex or search logic to treat individual CJK characters as searchable units.

Description Currently, the search functionality in Helix Note does not handle Chinese text properly. It appears that sentences are being treated as single, continuous tokens (words) because Chinese does not use spaces between characters. Steps to Reproduce Create a note containing a Chinese sentence, for example: 这是一段测试文字 (This is a test sentence). Attempt to search for a keyword in the middle of the sentence, such as 测试 (test). Observe that the search fails to return the note. Search for the very first character 这 (this), and the note will likely appear. Expected Behavior Search should be able to identify and match substrings within a Chinese sentence, regardless of whether the keyword starts at the beginning of the string. Actual Behavior The search only seems to work if the query matches the start of the "word." Since the entire sentence is identified as one long word due to the lack of spaces, mid-sentence searching is effectively broken. Potential Cause This is likely a tokenization issue. Many search engines or indexing libraries default to space-based delimiters. For Chinese, a character-based or N-gram tokenization approach is required to allow searching for characters or phrases within a continuous string of text. Suggested Fix / Workaround Implement a specialized tokenizer for CJK (Chinese, Japanese, Korean) characters. Enable N-gram indexing to allow for partial matching within tokens. Update the regex or search logic to treat individual CJK characters as searchable units.

Hello, the fix is ready and already pushed to git. It will be included in the next release (v1.3.0)

Hello, the fix is ready and already pushed to git. It will be included in the next release (v1.3.0)

v1.3.0 released. Closing this issue

v1.3.0 released. Closing this issue
Sign in to join this conversation.
No Branch/Tag specified
main
fix/vault-indication
v1.3.3
v1.3.2
v1.3.1
v1.3.0
v1.2.9
v1.2.8
v1.2.7
v1.2.6
v1.2.5
v1.2.4
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.1.9
v1.1.8
v1.1.7
v1.1.6
v1.1.5
v1.1.4
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.9
v1.0.8
v1.0.7
v1.0.6
v1.0.5
v1.0.4
v1.0.3
v1.0.2
v1.0.1
v1.0.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ArkHost/HelixNotes#53
Reference in a new issue
ArkHost/HelixNotes
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?