Basic Usage
Theparadedb.score(<key_field>)
function produces a BM25 score and can be added to any query where any of the ParadeDB operators are present.
description
is indexed, including rating
in the BM25 index definition will allow results matching
rating < 2
to rank higher than those that do not match.
Joined Scores
First, let’s create a second table calledorders
that can be joined with mock_items
:
Score Refresh
The scores generated by the BM25 index may be influenced by dead rows that have not been cleaned up by theVACUUM
process.
Running VACUUM
on the underlying table will remove all dead rows from the index and ensures that only rows visible to the current
transaction are factored into the BM25 score.