User Guide

Table Of Contents
600 Chapter 25: Using Verity Search Expressions
Score operators
Score operators control how the search engine calculates scores for retrieved documents. The
maximum score that a returned search element can have is 1.000. You can set the score to display
a maximum of four decimal places.
When you use a score operator, the search engine first calculates a separate score for each search
element found in a document, and then performs a mathematical operation on the individual
element scores to arrive at the final score for each document.
The document’s score is available as a result column. You can use the SCORE result column to
get the relevancy score of any document retrieved; for example:
<cfoutput>
<a href="#Search1.URL#">#Search1.Title#</a><br>
Document Score=#Search1.SCORE#<BR>
</cfoutput>
The following table describes the score operators:
Operator Description Example
YESNO Forces the score of an element to 1 if the
element’s score is nonzero.
<YESNO>mainframe. If the
retrieval result of the search on
mainframe is 0.75, the YESNO
operator forces the result to 1.
You can use YESNO to avoid
relevance ranking.
PRODUCT Multiplies the scores for the search elements in
each document matching a query.
<PRODUCT>(computers,
laptops) takes the product of
the resulting scores.
SUM Adds the scores for the search element in each
document matching a query, up to a maximum
value of 1.
<SUM>(computers, laptops)
takes the sum of the resulting
scores.
COMPLEMENT Calculates scores for documents matching a
query by taking the complement (subtracting
from 1) of the scores for the query’s search
elements. The new score is 1 minus the search
element’s original score.
<COMPLEMENT>computers. If
the search element’s original
score is .785, the
COMPLEMENT operator
recalculates the score as .215.