Search does not find parts of words #5316

Open
opened 2026-02-05 09:57:13 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @Danke23 on GitHub (Jun 18, 2025).

Describe the Bug

If I search for “onboard”, the search finds the word “onboard” - if I search for ‘board’ or “boarding”, the search no longer finds anything.

Steps to Reproduce

  1. Create a Page with "Onboarding" Text or Title
  2. Search for "boarding"

Expected Behaviour

I would like the search to find boarding in the word onboarding.

Screenshots or Additional Context

Image

Image

Image

Browser Details

No response

Exact BookStack Version

v25.05.1

Originally created by @Danke23 on GitHub (Jun 18, 2025). ### Describe the Bug If I search for “onboard”, the search finds the word **“onboard”** - if I search for **‘board’** or **“boarding”**, the search no longer finds anything. ### Steps to Reproduce 1. Create a Page with "Onboarding" Text or Title 2. Search for "boarding" ### Expected Behaviour I would like the search to find boarding in the word onboarding. ### Screenshots or Additional Context ![Image](https://github.com/user-attachments/assets/7841f67a-7d96-4706-bad8-4db5bb3ee876) ![Image](https://github.com/user-attachments/assets/aff2d6d0-58f4-4f3e-854e-846042a721da) ![Image](https://github.com/user-attachments/assets/d8e22b8b-6d13-4bf6-8c99-b5e8a3f83dae) ### Browser Details _No response_ ### Exact BookStack Version v25.05.1
OVERLORD added the 🐛 Bug label 2026-02-05 09:57:13 +03:00
Author
Owner

@virtadpt commented on GitHub (Jun 19, 2025):

I've been seeing this problem for a while, so confirmed over here.

@virtadpt commented on GitHub (Jun 19, 2025): I've been seeing this problem for a while, so confirmed over here.
Author
Owner

@cevinov commented on GitHub (Jun 19, 2025):

Yes please fix this, and also need to add feature where tag doesnt disappear after saving page draft

@cevinov commented on GitHub (Jun 19, 2025): Yes please fix this, and also need to add feature where tag doesnt disappear after saving page draft
Author
Owner

@ssddanbrown commented on GitHub (Jun 19, 2025):

This is known and intended. Search for standard terms is performed via a prefix match against indexed search terms (to make use of database indexes). A exact search term ("in quotes") will perform a slower exact match across the whole range of content text.

@ssddanbrown commented on GitHub (Jun 19, 2025): This is known and intended. Search for standard terms is performed via a prefix match against indexed search terms (to make use of database indexes). A exact search term (`"in quotes"`) will perform a slower exact match across the whole range of content text.
Author
Owner

@virtadpt commented on GitHub (Jun 20, 2025):

@ssddanbrown Okay, that makes sense. thank you.

@virtadpt commented on GitHub (Jun 20, 2025): @ssddanbrown Okay, that makes sense. thank you.
Author
Owner

@Danke23 commented on GitHub (Jun 25, 2025):

Okay, thank you very much for your answer. That's how it works.
However, this is somewhat impractical. I think it would make more sense to make this search for “exact search” the default search.

The naming is also confusing: For me, an exact search is the exact word and a normal search is a word snippet too.

@Danke23 commented on GitHub (Jun 25, 2025): Okay, thank you very much for your answer. That's how it works. However, this is somewhat impractical. I think it would make more sense to make this search for “exact search” the default search. The naming is also confusing: For me, an exact search is the exact word and a normal search is a word snippet too.
Author
Owner

@ssddanbrown commented on GitHub (Jun 25, 2025):

I think it would make more sense to make this search for “exact search” the default search.

The reason we do a prefix-match by default is because then we can actually use database indexes, and therefore search remains fairly performant, otherwise the exact search (or inner partial match) does not use indexes which can be quite intensive since it requires a full scan/search across content, and this scales linearly with content size, so is something I'd want to make default.

@ssddanbrown commented on GitHub (Jun 25, 2025): > I think it would make more sense to make this search for “exact search” the default search. The reason we do a prefix-match by default is because then we can actually use database indexes, and therefore search remains fairly performant, otherwise the exact search (or inner partial match) does not use indexes which can be quite intensive since it requires a full scan/search across content, and this scales linearly with content size, so is something I'd want to make default.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5316