RickStrahl / HelpBuilderReleases

West Wind Html Help Builder Releases and Bug Reporting
http://helpbuilder.west-wind.com
8 stars 3 forks source link

Search content feature #112

Closed rikaye closed 3 years ago

rikaye commented 3 years ago

Search topic in the side bar is nice but somewhat limited. I'd like to see a general search option added when deploying as HTML.

RickStrahl commented 3 years ago

For that to work you need a server side bit that can do the searching.

Actually there's something on my backlog that is a client and server side indexing engine. But it won't be super fast for initial search.

RickStrahl commented 3 years ago

So good news: I've added an index search to Help Builder using lunr.js, which is simple way to build up a search index on the fly in the browser.

You can now choose between the old default implementation that searches topic headers, or the new Detailed mode which searces topic headers, keywords, ids and 512 chars of the content:

image

Lunr is true indexed and somewhat basic weighted search meaning it can match multiple terms and rank them based on number of occurrances, similarity and where in the document the match occurs. you can also use wild cards.

It works but in playing around with this I'm not seeing much improved search results between the simpler title only search.

Made some additional changes:

image

Note the existing selected topic stays activated until you change it.

Overall that part actually makes the search much more usable as it drastically reduces the clutter.

It'll be in the next update, hopefully next week.

RickStrahl commented 3 years ago

It's running here now so you can check it out:

https://markdownmonster.west-wind.com/docs/

rikaye commented 3 years ago

Thanks, Rick! I checked it out and it looks like it will be a good update.

RickStrahl commented 3 years ago

More info on the search feature in the updated documentation:

Searching in the Table of Contents