fix: Web Search plugin scoring system did not match intended result o…
The scoring system for the results of the plugin was broken, the desired order was:
Specific Keyword Exact Result > Specific Keyword Suggestion Result > Global Keyword Exact Result > Global Keyword Suggestion Result
Problem was the score of these results (with the desired order) was 51 > 49 > 50 > 48
Which obviosly got the wrong order. Simply fixed it by tweeking out the numbers
Checked it up and it works all fine.
Summary by cubic
Summary of changes
Fixes the Web Search plugin result scoring so results appear in the intended order: specific keyword exact match, then specific keyword suggestion, then global keyword exact match, then global keyword suggestion.
- Changed the suggestion score from 48 to 49.
- Added the
ActionKeywordScoreBonusconstant (value 2) applied to action keyword matches in both exact and suggestion scoring paths. - Removed the inline
scoreStandard + 1andscoreSuggestions + 1logic in favor of the new constant. - No memory usage impact; only scoring constants changed.
- No security impact.
- No unit tests added for this change.
Release Note
Web search results are now ranked so the most relevant matches show up first instead of getting a random order.