Score Operators


The score operators affect how the search engine calculates scores for retrieved documents. When a score operator is used, 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 YESNO operator has wide application, whereas the PRODUCT, SUM, and COMPLEMENT operators are intended for use mainly by application developers who want to generate queries programmatically.

YESNO

Forces the score of an element to 1, if the element's score is nonzero. Examples help clarify this.

<YesNo> ("Chloe")

If the retrieval result of the search on "Chloe" was .75, with the YesNo operator, the result would be 1; if the retrieval result is 0, it remains 0.

This operator allows you to limit a search to only those documents matching a query, without the score of that query affecting the final scores of the documents. For example, to search among documents that contain "Chloe," with "Mead" as the determinant for ranking, you cannot simply specify the following:

"Chloe" <AND> "Mead"

because that would produce documents ranked with scores combined from both elements. The following would do what you want:

<YesNo> ("Chloe") <AND> "Mead"

If the retrieval result of the search on "Chloe" was .5 and that on "Mead" was .75, without the YesNo operator, the combined result would be .5; with the operator, however, it is .75, because the score of AND is calculated to be the minimum score of all its search elements.

PRODUCT

Calculates scores for documents matching a query by multiplying the scores for the query's search elements together. To arrive at a document's score, the search engine calculates a score for each search element and multiplies these scores together.

Following is an example of search syntax:

<PRODUCT> ("computers","laptops")

If a search on "computers" generated a score of .5 and a search on "laptops" generated a score of .75, the preceding search would produce a score of .375.

SUM

Calculates scores for documents matching a query by adding together, to a maximum of 1, the scores for the query's search elements. To arrive at a document's score, the search engine calculates a score for each search element and adds these scores together.

Following is an example query expression:

<SUM> ("computers","laptops")

If a search on "computers" generated a score of .5 and a search on "laptops" generated a score of .2, the preceding search would produce a score of .7 If a search on "computers" generated a score of .5 and a search on "laptops" generated a score of .75, the preceding search would produce a score of 1.00 (the maximum).

COMPLEMENT

Calculates scores for documents matching a query by taking the complement (subtracting from 1) the scores for the query's search elements. To arrive at a document's score, the search engine calculates a score for each search element and takes the complement of these scores.

Following is an example of search syntax:

<COMPLEMENT> ("computers")

The COMPLEMENT operator is a unary operator. It multiplies search elements as specified. The elements are combined, using the ACCRUE operator by default, to generate a single score which is then complemented. A sample query expression with two search elements is below:

<COMPLEMENT> ("computers","laptops")

In the above example, the query is evaluated as the word "computers" accrued using the ACCRUE operator with the word "laptops." The COMPLEMENT operator is applied to the result.





Copyright © 2001, Verity, Inc. All rights reserved.