Modifying the Search Ranking
The search results are displayed in the Search tab when a user types a word to search for and clicks Go. The search results are sorted by the relevancy ranking, which is calculated based on the scoring preference defined for the HTML tags in the wwhelp_files.xml file. By default, WebWorks Help assigns relevancy rankings based on where in a topic a particular item is found.
For example, if you set the scoring preference, or weight, for Heading 1 to 25 and you set the weight for Heading 2 to 15, then any search term found in a Heading 1 returns a higher relevancy ranking than if the search term is found in a Heading 2.
The following scenario illustrates how the relevancy ranking is calculated:
If you search for the word popup, and that word appears in both a Heading 1 and a Heading 2 on one page, and in a Heading 1 on another page, the search returns two results sorted by the relevancy ranking.
To get the relevancy ranking, WebWorks Help takes the score of each search result and divides it by the highest score found. To get the score of each search result, the scoring preference for each HTML tag is used.
For example, Heading 1 has a scoring preference of 25 and Heading 2 has a scoring preference of 15. If the word “popup” appears in a Heading 1 and a Heading 2 on a topic page, then the score for that word on that page is 25+15=40. If the word “popup” appears in a Heading 1 on another topic page, then the score for that word on that page is 25. Therefore, if 40 is the highest score that a search for “popup” returns, the relevancy ranking of the first search result is 100%=40/40x100%, and the relevancy ranking for the second search result is 38%=15/40x100%.
To modify the relevancy ranking for search results
In your Stationery design project, on the View menu, click Project Directory. For more information about override files and locations, see “Understanding Stationery, Projects, and Overrides” on page 373.
If you want to override the message appearance for 'all WebWorks Help targets, create the Formats\WebWorks Help 5.0\Transforms folder in your projectname folder, where projectname is the name of your ePublisher project.
If you want to override the message appearance for one WebWorks Help 'target, create the Targets\WebWorks Help 5.0\Transforms folder in your projectname folder, where projectname is the name of your ePublisher project.
Copy the wwhelp_files.xml file from the following folder to the Transforms override folder you created within your project folder:
Program Files\WebWorks\ePublisher Pro\Formats\WebWorks Help 5.0\ Transforms
Open the wwhelp_files.xml file you copied to your project override folder.
Find the following block of code:
<meta name="keywords" weight="100"/>
<meta name="description" weight="50"/>
<meta name="summary" weight="50"/>
Modify the weight attributes for any tags, such as h1 and h2, you want to change.
Save and close the wwhelp_files.xml file.
Regenerate your project to review the changes.