Search is not working like expected #3959

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

Originally created by @hieste on GitHub (Aug 8, 2023).

Describe the Bug

Hello Dan,

if try to make a normal search for example "675", the search engine do not find it in an expression like M675.
image
If do the same search in "Exact Matches" the search engine find some result. Think there is a problem...
image

Steps to Reproduce

  1. Create page with Topic M675
  2. Normal search with "675" ==> No result
  3. Exact match search with "675" ==> Some results...

Expected Behaviour

In "normal" search, there should be also results, in exact matches only if it matches totally.

Screenshots or Additional Context

No response

Browser Details

Chrome

Exact BookStack Version

23.06.1

PHP Version

8.1

Hosting Environment

Debian

Originally created by @hieste on GitHub (Aug 8, 2023). ### Describe the Bug Hello Dan, if try to make a normal search for example "675", the search engine do not find it in an expression like M675. <img width="319" alt="image" src="https://github.com/BookStackApp/BookStack/assets/30119314/24630c3d-2ebe-4e94-9830-611703579270"> If do the same search in "Exact Matches" the search engine find some result. Think there is a problem... <img width="404" alt="image" src="https://github.com/BookStackApp/BookStack/assets/30119314/9aaaa5bd-50ae-4a25-988a-a85807a4fdbe"> ### Steps to Reproduce 1. Create page with Topic M675 2. Normal search with "675" ==> No result 3. Exact match search with "675" ==> Some results... ### Expected Behaviour In "normal" search, there should be also results, in exact matches only if it matches totally. ### Screenshots or Additional Context _No response_ ### Browser Details Chrome ### Exact BookStack Version 23.06.1 ### PHP Version 8.1 ### Hosting Environment Debian
OVERLORD added the 🐛 Bug label 2026-02-05 07:58:04 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Aug 8, 2023):

Thanks for raising @hieste, but this isn't something we'd consider a bug, it's known functionality.
Default search terms are prefix matched, to efficiently search across all indexed terms.
Exact searches are done via a slower "contains" match which will search for that exact term string within the text representation of content.

Will therefore close this off since it's more a difference to expectations rather than a bug in the platform.

@ssddanbrown commented on GitHub (Aug 8, 2023): Thanks for raising @hieste, but this isn't something we'd consider a bug, it's known functionality. Default search terms are prefix matched, to efficiently search across all indexed terms. Exact searches are done via a slower "contains" match which will search for that exact term string within the text representation of content. Will therefore close this off since it's more a difference to expectations rather than a bug in the platform.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3959