Some questions about the search function #1833

Closed
opened 2026-02-05 02:00:52 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @BarryBooder on GitHub (Aug 22, 2020).

Describe the bug
Hello, I am a Chinese user. Bookstack's search feature is less friendly to Chinese search support. For example, I have a book called "I want to swim" (In Chinese), but if I search for "swim" in Chinese, the search will be unsuccessful. After testing, it is found that Chinese search can only match words from left to right, and cannot span words on the left, or extract some parts of words from the whole sentence for searching.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Build a book
  2. Fill in book contents
  3. After saving the contents of the book, return to the home page
  4. Search the search bar for Chinese words

Expected behavior
The Chinese search function should be the same as the English search function

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings):0.29.3
  • PHP Version:7.2
  • Hosting Method (Nginx/Apache/Docker): Nginx

Thanks!

Originally created by @BarryBooder on GitHub (Aug 22, 2020). **Describe the bug** Hello, I am a Chinese user. Bookstack's search feature is less friendly to Chinese search support. For example, I have a book called "I want to swim" (In Chinese), but if I search for "swim" in Chinese, the search will be unsuccessful. After testing, it is found that Chinese search can only match words from left to right, and cannot span words on the left, or extract some parts of words from the whole sentence for searching. **Steps To Reproduce** Steps to reproduce the behavior: 1. Build a book 2. Fill in book contents 3. After saving the contents of the book, return to the home page 4. Search the search bar for Chinese words **Expected behavior** The Chinese search function should be the same as the English search function **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings):0.29.3 - PHP Version:7.2 - Hosting Method (Nginx/Apache/Docker): Nginx Thanks!
OVERLORD added the :cat2:🐈 Possible duplicate label 2026-02-05 02:00:52 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Sep 5, 2020):

Hi @BarryBooder,
Thanks for the request. Yeah, This is an unfortunate result of how I implemented in indexing for the search system, It will split indexed tokens on punctuation and spaces then left-match them when searching which does not work for chinese text.

Since this is already open under #778 I'm going to close this off as a duplicate.

@ssddanbrown commented on GitHub (Sep 5, 2020): Hi @BarryBooder, Thanks for the request. Yeah, This is an unfortunate result of how I implemented in indexing for the search system, It will split indexed tokens on punctuation and spaces then left-match them when searching which does not work for chinese text. Since this is already open under #778 I'm going to close this off as a duplicate.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1833