Search does not work if presents before text
Describe the Bug
If text line contains at the beginning (before text), search will not show it in results until is removed.
If presents after the text, search will work.
Search index regeneration does not resolve this issue.
I can't say for sure when it broke.
Steps to Reproduce
- Create new page or edit existing page
- Add
via Edit Source before any text - Try searching this text, search results will not display this page
- Remove
via Edit Source before text used above - Search will work as expected, showing page in results
Expected Behaviour
Search should work while ignoring
We have more than 200+ pages with in HTML and I can't say for sure how many of it contains before the text, 'breaking' our search index.
Screenshots or Additional Context
No response
Browser Details
Firefox 139.0.1, Chromium 134.0.6998.102
Exact BookStack Version
v25.05
I've been seeing this problem for about six months now. It took me a while to get into the habit of hitting 'home' to make sure there were no spaces before my search terms.
Thanks @rockenren for raising and thanks @virtadpt for confirming. This has now been addressed via f518a3be373500b0382b49ef814b9c5ee76c3d8e, and will be part of the next patch release.
You'll probably want to regenerate the search index after updating to address existing search indexing, otherwise you won't be able to search on those terms still unless something triggers a re-index (updating the page, or running the referenced regen command).