Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Item sorting might be biased towards items with tags+description #88

Open
jarle opened this issue Sep 30, 2017 · 0 comments · May be fixed by #89
Open

Item sorting might be biased towards items with tags+description #88

jarle opened this issue Sep 30, 2017 · 0 comments · May be fixed by #89

Comments

@jarle
Copy link
Contributor

jarle commented Sep 30, 2017

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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant