Scoring Operators

The scoring operators influence the way in which the search module ranks the documents it finds, i. e. how it calculates their scores. These operators can be combined with each other and with other operators of the query language.

When a scoring operator is used, the search engine first calculates a separate score for each element of the search expression found in the document. Then the resulting score is calculated from these scores using a mathematical operation.

The YESNO operator can be useful in many situations, whereas the PRODUCT, SUM, and COMPLEMENT operators are meant to be used by application developers who want to generate queries programmatically.

Operator name Description
COMPLEMENT This operator subtracts a document’s total score from 100.
PRODUCT Using this operator, documents can be scored in a more differentiated way. The individual results of the search are multiplied with each other, and the resulting value is divided by 100.
SUM This operator calculates the sum of the individual scores up to a total of 100.
YESNO 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. The operator sets an individual result to 100 if it is greater than 0, otherwise it remains 0.