296
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>
</cfoutput>
The following table describes the score operators:
Operator
YESNO
PRODUCT
SUM
COMPLEMENT
<a href="#Search1.URL#">#Search1.Title#</a><br>
Document Score=#Search1.SCORE#<BR>
Description
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.
Multiplies the scores for the search elements in each document
matching a query:
<PRODUCT>(computers, laptops)
Takes the product of the resulting scores.
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.
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.
Chapter 15 Indexing and Searching Data
Need help?
Do you have a question about the COLDFUSION 5-DEVELOPING and is the answer not in the manual?
Questions and answers