Navigation:  Publishing > Configuring Your Output > Webhelp >

Full Text Search tricks

Print this Topic Previous pageReturn to chapter overviewNext page
Show/Hide Hidden Text

There are a couple of manual settings and switches you can use to change the way that full-text search works in Webhelp. These aren't absolutely essential but they can be useful for advanced users to fine-tune search performance.

For full details on all the standard search configuration settings please refer to Full Text Search in the Project Properties section.

Excluding topics and files from the search index:

HTML files with names beginning with an underscore (_myfile.htm) are not indexed for searching. You can use this knowledge to exclude both topics and other files from your Browser Help search index (i.e. files not generated by Help & Manual).

To exclude topics from the search: Add an underscore to the beginning of the topic's topic ID in the tab. For example, to include a topic with the ID Introduction from the search change the ID to _Introduction. (Note that you will then also have to change the addresses of any existing calls to your topic from your application!)
To exclude additional files from the search: Just add an underscore to the beginning of the file name. For example, change myfile.html to _myfile.html.
Excluding page components from the search index:

Out of the box the full-text search feature in Webhelp indexes everything in the page, including all the text in the header. When the user executes a search the header text gets displayed at the beginning of the "excerpt" for each topic displayed in the list of search results.

You can change this with two switches that turn indexing on and off in your HTML templates. These can be used to exclude the both the header itself and the header information from the index, which means that the excerpts will begin with the actual text of your topics. Here's how to do it:

1.Go to Project > Project Properties > Webhelp > Topic Pages.
2.Select "Let me edit HTML code directly" and select the Main template. (You must repeat this for the other templates if you have created any other custom templates.)
3.Enter <!--ZOOMSTOP--> on a single line of its own directly before the beginning of the header code, (directly before the <IF_TOPIC_HEADER> switch), like this:

<!--ZOOMSTOP-->
<IF_TOPIC_HEADER>

4.Enter <!--ZOOMRESTART--> on a single line of its own directly before the <%TOPIC_TEXT%> variable, like this:

<!--ZOOMRESTART--> 
<%TOPIC_TEXT%>

That's it. When you recompile everything in the header will be excluded from the index and the excerpts. You can also exclude parts of individual topics from the search index. To do this just use the Insert - HTML Code function to insert the stop and start switches before and after the text you want to exclude.

See also:

The Search template for Browser Help (Using HTML Templates)

Full Text Search (Configuration Options)

 


Page url: http://www.helpandmanual.com/help/index.html?hm_working_configoutput_html_search.htm