Constant Boosting
To boost a query, cast the query to theboost
type. In this example, the shoes
query is weighted twice as heavily as the footwear
query.
boost
takes a numeric value, which is the multiplicative boost factor. It can be any floating point number between -2048
and 2048
.
Query builder functions can also be boosted:
Boosting by Field
The following query boosts the score of each row by multiplying it by the row’srating
. This means that items with
the same score but a higher rating
will score higher overall.
Ordering by
paradedb.score(id) * rating
is less performant than ordering by
just paradedb.score(id)
over large tables.