First stab at document scoring. This is made harder by the fact that score() evaluates expressions that merely contribute to scoring. So match predicates return true/false, not a score, so we have a few options:
Specify a whole "parallel" expression specification that says "if used in scoring mode", the algorithm is: ..."
Re-specify all predicate operators/functions as returning a PredicateResult { result, score } or a tuple (result, score) or similar.
Handwave it away and say that score() evaluates the predicates and assigns a score based on whether the , but not exactly how. This is what I've done so far.
First stab at document scoring. This is made harder by the fact that
score()
evaluates expressions that merely contribute to scoring. Somatch
predicates return true/false, not a score, so we have a few options:PredicateResult { result, score }
or a tuple(result, score)
or similar.score()
evaluates the predicates and assigns a score based on whether the , but not exactly how. This is what I've done so far.