servicerunner: aggressively expand scoring system

Original commit message(s)

  • servicerunner: aggressively expand scoring system

the previous bonus system wasn't producing very good results when perfect matches were involved. so, we now track perfect matches (along with the other properties of a match -- for future use) which allows us to more aggressively outline the base score we expect a good match to have with regards to relative order.

at its heart this functions mostly the same. matching produces scorecards, scorecards are aggregated into weightedcards and those are then computed. the main difference is a new perfectMatchScore logic. if a match was perfect (required no substitutions) then we give it serious base line value relative to their weight. only after that we run the previous fuzzy scoring logic relying on bitap and levenshtein scores.

the base score makes sure we have accurate ordering of perfect matches while the fuzzy score makes sure matches within the same base score are then sorted according to how fuzzy or distant they are

BUG: 511078

Merge request reports

Loading
Loading