Show context when searching #805

Closed
opened 2026-02-04 22:20:35 +03:00 by OVERLORD · 11 comments
Owner

Originally created by @pth0rn on GitHub (Sep 1, 2018).

Right now the search only returns the pages that contain the string. However when you have a lot of pages it can make it more difficult to find what you're looking for.

I think it's important to have a feature like MediaWiki where it shows the page title, but below also shows the context around the string you searched for.

Otherwise users would have to view a number of pages and then use the browser's search function to actually see the context.

Originally created by @pth0rn on GitHub (Sep 1, 2018). Right now the search only returns the pages that contain the string. However when you have a lot of pages it can make it more difficult to find what you're looking for. I think it's important to have a feature like MediaWiki where it shows the page title, but below also shows the context around the string you searched for. Otherwise users would have to view a number of pages and then use the browser's search function to actually see the context.
OVERLORD added the 🛠️ Enhancement label 2026-02-04 22:20:35 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Sep 2, 2018):

This was a feature before so much of the code may still be there. Can't remember the exact reason for removing, if there was such a reason, May have been a mistake on my part.

@ssddanbrown commented on GitHub (Sep 2, 2018): This was a feature before so much of the code may still be there. Can't remember the exact reason for removing, if there was such a reason, May have been a mistake on my part.
Author
Owner

@cooter2 commented on GitHub (Jan 23, 2019):

I am evaluating this for my use, this is one of the things I noticed as well. I would also like to expand on the feature by requesting that the search term is highlighted in both the response and in the page when it is opened from a search result. Perhaps make the highlighting feature a configurable option?

@cooter2 commented on GitHub (Jan 23, 2019): I am evaluating this for my use, this is one of the things I noticed as well. I would also like to expand on the feature by requesting that the search term is highlighted in both the response and in the page when it is opened from a search result. Perhaps make the highlighting feature a configurable option?
Author
Owner

@mattpera commented on GitHub (Apr 25, 2019):

Hi! Would love to have this feature as well!

@mattpera commented on GitHub (Apr 25, 2019): Hi! Would love to have this feature as well!
Author
Owner

@jameswmcnab commented on GitHub (May 20, 2019):

@ssddanbrown Would you be interested in a PR for this at this time?

@jameswmcnab commented on GitHub (May 20, 2019): @ssddanbrown Would you be interested in a PR for this at this time?
Author
Owner

@ssddanbrown commented on GitHub (May 20, 2019):

@jameswmcnab Absolutely! Especially if it came with a test to cover it.

As mentioned above, I seem to remember this being a part of search before so there may be some residual code somewhere unless I got overly hasty with a past clean-up.

@ssddanbrown commented on GitHub (May 20, 2019): @jameswmcnab Absolutely! Especially if it came with a test to cover it. As mentioned above, I seem to remember this being a part of search before so there may be some residual code somewhere unless I got overly hasty with a past clean-up.
Author
Owner

@jameswmcnab commented on GitHub (May 22, 2019):

@ssddanbrown Okay great, I'll see what I can do when I get some time next week 👍

@jameswmcnab commented on GitHub (May 22, 2019): @ssddanbrown Okay great, I'll see what I can do when I get some time next week 👍
Author
Owner

@sistemasge commented on GitHub (Jul 30, 2019):

I have resolved the problem using the "Browser Searching Feature" (in Google Chrome, type the shortcut [CTRL + [F]) but I think this functionality would be very useful if Booksatck had it.

@sistemasge commented on GitHub (Jul 30, 2019): I have resolved the problem using the "Browser Searching Feature" (in Google Chrome, type the shortcut [CTRL + [F]) but I think this functionality would be very useful if Booksatck had it.
Author
Owner

@mardukbp commented on GitHub (Dec 24, 2020):

TNTSearch is a full-text search engine written in PHP that provides this feature.

@mardukbp commented on GitHub (Dec 24, 2020): [TNTSearch](https://github.com/teamtnt/tntsearch) is a full-text search engine written in PHP that provides this feature.
Author
Owner

@mattpera commented on GitHub (Sep 21, 2021):

Hi team!
Any update on this enhancement? Is it something planned for near future?
Great job anyway!
Matt

@mattpera commented on GitHub (Sep 21, 2021): Hi team! Any update on this enhancement? Is it something planned for near future? Great job anyway! Matt
Author
Owner

@ssddanbrown commented on GitHub (Sep 23, 2021):

No solid update on this right now @mattpera.
Was thinking about paying some attention to the search system overall when I have more time to dedicate to the project (As of next month).

@ssddanbrown commented on GitHub (Sep 23, 2021): No solid update on this right now @mattpera. Was thinking about paying some attention to the search system overall when I have more time to dedicate to the project ([As of next month](https://danb.me/blog/posts/leaving-my-job-to-focus-on-open-source/)).
Author
Owner

@ssddanbrown commented on GitHub (Nov 13, 2021):

Highlighting (via boldening) of terms within search results has been added as part of #3043 and will be part of the next release.
Please note, this is somewhat of an estimation of what might have contributed to the match.
Will therefore close this off.

@ssddanbrown commented on GitHub (Nov 13, 2021): Highlighting (via boldening) of terms within search results has been added as part of #3043 and will be part of the next release. Please note, this is somewhat of an estimation of what might have contributed to the match. Will therefore close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#805