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 Publishing Options chapter.
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. |
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 Explorer > Configuration > HTML Page Templates > Default. 2.Select the "HTML Source Code" tab. 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--> 4.Enter <!--ZOOMRESTART--> on a single line of its own directly before the <%TOPIC_TEXT%> variable, like this: <!--ZOOMRESTART--> 5.Repeat steps 1-4 for the other templates in the HTML Page Templates section if you have created any other custom templates. 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)