Normal search only finds exact matches, quoted search finds substrings (reversed behaviour?) #5305

Open
opened 2026-02-05 09:56:31 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @dom6770 on GitHub (Jun 4, 2025).

Describe the Bug

When using the search in BookStack, the normal (unquoted) search only returns exact matches, while quoted search returns substring matches.
For example, searching for wallet (without quotes) returns only one exact match, but searching for "wallet" (with quotes) returns multiple results including substrings like "kwalletd". This seems reversed compared to usual search behavior and user expectations?

Steps to Reproduce

  1. Enter a search term (e.g., wallet) without quotes in the BookStack search field.
  2. Now search for the same term with quotes ("wallet").
  3. Note that this search now returns additional results that contain the search term as a substring (e.g., “kwalletd”, “wallets” etc).

Expected Behaviour

Opposite.

Searching with quotes should only return exact matches.
Unquoted searches should find all entries containing the search term as a substring

Screenshots or Additional Context

No response

Browser Details

Firefox 139 on Windows 11

Exact BookStack Version

v25.02.2 (Docker)

Originally created by @dom6770 on GitHub (Jun 4, 2025). ### Describe the Bug When using the search in BookStack, the normal (unquoted) search only returns exact matches, while quoted search returns substring matches. For example, searching for wallet (without quotes) returns only one exact match, but searching for "wallet" (with quotes) returns multiple results including substrings like "kwalletd". This seems reversed compared to usual search behavior and user expectations? ### Steps to Reproduce 1. Enter a search term (e.g., wallet) without quotes in the BookStack search field. 2. Now search for the same term with quotes ("wallet"). 3. Note that this search now returns additional results that contain the search term as a substring (e.g., “kwalletd”, “wallets” etc). ### Expected Behaviour Opposite. Searching with quotes should only return exact matches. Unquoted searches should find all entries containing the search term as a substring ### Screenshots or Additional Context _No response_ ### Browser Details Firefox 139 on Windows 11 ### Exact BookStack Version v25.02.2 (Docker)
OVERLORD added the 🐛 Bug label 2026-02-05 09:56:31 +03:00
Author
Owner

@PatrickFrederiksen commented on GitHub (Aug 13, 2025):

While not being what is expected, and whats stated in the documentation, it seems to be the only way to do substring matching.

Changing the default unquoted search to substring search might have a perfomance impact on larger installations.

@PatrickFrederiksen commented on GitHub (Aug 13, 2025): While not being what is expected, and whats stated in the documentation, it seems to be the only way to do substring matching. Changing the default unquoted search to substring search might have a perfomance impact on larger installations.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5305