Output Formats » WebWorks Reverb 2.0 » Using Baggage Files » Indexing Baggage Files and External URLs » Assigning Relevance Weight to Your HTML and PDF Baggage Files
Assigning Relevance Weight to Your HTML and PDF Baggage Files
The search results are sorted by relevancy ranking, which, in case of HTML baggage files, is calculated based on the scoring preference defined for the HTML tags in the search_settings.xml file. By default, WebWorks Reverb 2.0 assigns relevancy rankings based on where in a topic a particular item is found.
To Modify the Relevancy Ranking in Baggage Files for Search Results
1. Open your project with ePublisher Designer.
2. If you want to override the relevancy ranking for all WebWorks Reverb 2.0 targets, create the Formats\WebWorks Reverb 2.0\Transforms folder in your projectname folder, where projectname is the name of your ePublisher project.
3. If you want to override the relevancy ranking for one WebWorks Reverb 2.0 target, create the Targets\WebWorks Reverb 2.0\Transforms folder in your projectname folder, where projectname is the name of your ePublisher project.
4. Create a customization of your search_settings.xml file.
5. You’ll see the following block of code:
<Settings version="1.0" xmlns="urn:WebWorks-Settings-Schema">
<ScoringPrefs default-weight="0.05" pdf-weight="0.05">
<meta name="keywords" weight="1.0"/>
<meta name="description" weight="1.0"/>
<meta name="summary" weight="1.0"/>
<title weight="1.0"/>
<div class="myclass" weight="0.05"/>
<div weight="0.05"/>
<h1 weight="0.1"/>
<h2 weight="0.1"/>
<caption weight="0.1"/>
<h3 weight="0.1"/>
<th weight="0.1"/>
<h4 weight="0.1"/>
<h5 weight="0.1"/>
<h6 weight="0.1"/>
<h7 weight="0.1"/>
<p weight="0.05"/>
</ScoringPrefs>
</Settings>
6. Modify the weight attributes for any tags, such as h1 and h2, you want to change. You can also specify additional tags with or without class attributes to further refine weights for your HTML baggage files. You may use decimal values to modify the weight attribute value.
Note: If you wish to set a default weight to tags that are not defined in this file simply update the default-weight attribute value.
Note: You can change the default weight for all of the text in a PDF file by changing the pdf-weight attribute value.
7. Save and close the search_settings.xml file.
8. Regenerate your project to review the changes.
Was this helpful?
Last modified date: 11/29/2021