Closed rikaye closed 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.
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:
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:
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.
It's running here now so you can check it out:
Thanks, Rick! I checked it out and it looks like it will be a good update.
More info on the search feature in the updated documentation:
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.