weight (*)
The weight operator multiplies the score by the given factor, topping out at 100 when the score exceeds 100. For example, the querycat, dog2sums the score of *cat with twice the score of dog, topping out at 100 when the score is greater than 100.
In expressions that contain more than one query term, use the weight operator to adjust the relative scoring of the query terms. Reduce the score of a query term by using the weight operator with a number less than 1; increase the score of a query term by using the weight operator with a number greater than 1 and less than 10.
The weight operator is useful in ACCUMulate ( _ ), AND (&), or OR (|) queries when the expression has more than one query term. With no weighting on individual terms, the score cannot tell which of the query terms occurs the most. With term weighting, you can alter the scores of individual terms and hence make the overall document ranking reflect the terms you are interested in.
Syntax
| Syntax | Description |
|---|---|
| term*n | Returns documents that contain term. Calculates score by multiplying the raw score of term by n, where n is a number from 0.1 to 10. |
Examples for Weight (*) Operator
Suppose you have a collection of sports articles. You are interested in the articles about Brazilian soccer. It turns out that a regular query on soccer or Brazilreturns many high ranking articles on US soccer. To raise the ranking of the articles on Brazilian soccer, enter the following query:
'soccer or Brazil*3'
Table 3-3 illustrates how the weight operator can change the ranking of three hypothetical documents A, B, and C, which all contain information about soccer. The columns in the table show the total score of four different query expressions on the three documents.
Table 3 Score Samples
| Document | soccer | Brazil | soccer or Brazil | soccer or Brazil*3 |
|---|---|---|---|---|
| A | 20 | 10 | 20 | 30 |
| B | 10 | 30 | 30 | 90 |
| C | 50 | 20 | 50 | 60 |
The score in the third column containing the query soccer or Brazil is the score of the highest scoring term. The score in the fourth column containing the query soccer or Brazil3* is the larger of the score of the first column soccer and of the score Brazil multiplied by three, Brazil3*.
With the initial query of soccer or Brazil, the documents are ranked in the order C B A. With the query of soccer or Brazil3*, the documents are ranked B C A, which is the preferred ranking.
Weights can be added to multiple terms. The query Brazil OR (soccer AND Brazil)3* will increase the relative scores for documents that contain both soccer and Brazil.