Skip to content
Search! & Match! API
Weighting
latest

Weighting

Weighting🔗

developer [software engineer] #1.5 "software architect" #0.8

Terms are weighted within a query by adding a number weight behind the term. If no weight is specified, a term receives a default weight of #1.0. The weight influences the ranking of documents of the weighted query expression in relation to the other expressions of the same field. Weights can also be assigned to more complex query expressions, such as phrases, conditions or range queries.

In the example above [software engineer] contributes 1.5 times as much to the result score as normal and "software architect" 0.8 times as much. Weights only influence the relative importance among query parts belonging to the same field. Example:

developer experience:[software engineer] #1.5 "software architect" #0.8

The weight of 1.5 given to [software engineer] will be ignored in this case. Since [software engineer] is the only query expression on the experience field, there is no other query expression where the weight would relate to.

Also, weights inside an OR-combination are ignored.