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.
This requires support for PHP or ASP on your web server. Also, it cannot be tested locally – if you try to open WebHelp configured for ASP or PHP search locally you will only see a plage of source code when you select search.
See this topic for details on how to configure PHP or ASP search.
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). This will also exclude topics from CHM search if you activate the corresponding option for CHM in the HTML Export Options.
•To exclude topics from the search: Add an underscore to the beginning of the topic's topic ID in the Topic Options tab. For example, to exclude 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.
In WebHelp, the full-text search includes the index keywords associated with topics in the search. This means that you can enhance your search by adding keywords to topics that users might search for, even though they are not included directly in the text of the topic. This can significantly enhance the usefulness of your searches.
See the Keywords and Indexes chapter to learn about how to add index keywords to your topics.
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:
Edit in the skin if you are using a skin
Everything in these templates must be edited in the .hmskin skin file if you are publishing with a skin. When you use a skin, the HTML templates and settings in the skin replace those in your project. Usually, when you are using a skin, you don't need to edit anything because it has all already been set up by the designer.
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:
4.Enter <!--ZOOMRESTART--> on a single line of its own directly before the <%TOPIC_TEXT%> variable, like this:
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.
The Search template for Browser Help (Using HTML Templates)
Full Text Search (Configuration Options)