Displaying the relevance ranking in search results
This article describes how to display the relevance ranking within the search results.
-
Log in to the FDSE Admin Page.
-
Go to "User Interface", then scroll down to "Advanced: Edit Templates".
-
Open the "Line Listing" template. It will look like this:
<dl> <dt><b>%Rank%. <a href="%Redirector%%URL%">%Title%</a></b> %admin_options%</dt> <dd class="sr"> %Description%<br /> <b>URL:</b> %url% - %Size% - %Day% %Month% %Year% %context_line% </dd> </dl> -
The relevance value is stored in the %relevance% variable. Add it to the template:
<dl> <dt><b>%Rank%. <a href="%Redirector%%URL%">%Title%</a></b> %admin_options%</dt> <dd class="sr"> %Description%<br /> <b>URL:</b> %url% - %Size% - %Day% %Month% %Year% %context_line% <% if relevance %><br />Relevance: %relevance%<% end if %> </dd> </dl>The if statement is used because the %relevance% variable is not defined when sorting results by last modified date, or when reviewing the records from the admin page.
-
Your search results will now display the relevance value.
The relevance value is an integer from 1 to 999999. The number is based on the number of times the keywords were found in the document. See Sorting Results: How relevance is calculated for more information.
Unlike other search engines, FDSE does not support a percentage-based (1% - 100%) relevance.
"Displaying the relevance ranking in search results"
http://www.xav.com/scripts/search/help/1170.html