Item sorting might be biased towards items with tags+description
jarle opened this issue · 0 comments
Here is the relevant code snippet for sorting.
Current behavior:
Two commands with nearly identical display names that matches the query well can have significantly different scores. If one of them features both a tag and a description that contains the query, it will have maybe 2-3x higher score, maybe even being surpassed by other commands that also have descriptions and tags.
Expected behavior:
Two commands with nearly identical display names that matches the query well should have a very similar score. If the query matches descriptions or tags better than display name, that score should be used instead.
Potential fix:
For each item, use the maximum score out of the three:
itemScore = Math.max(displayNameScore, tagScore, descriptionScore)