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

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

@jarle

Description

@jarle

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions