User Guide
296 Chapter 15 Indexing and Searching Data
Score operators
Score operators govern 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 percentage display to as many as 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.
Note that 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
YESNO Forces the score of an element to 1 if the element’s score is
non-zero:
<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 together 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.