Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve search order based display name containing pattern #753

Merged
merged 1 commit into from
Dec 4, 2020
Merged

Improve search order based display name containing pattern #753

merged 1 commit into from
Dec 4, 2020

Conversation

scaryrawr
Copy link
Contributor

Fixes #108

image

Same with things like Steam or Edge
image

image

@scaryrawr scaryrawr changed the title Improve search order based on contains Improve search order based display name containing pattern Dec 2, 2020
@mmstick mmstick requested a review from a team December 2, 2020 02:24
return a_name.toLowerCase() > b_name.toLowerCase() ? 1 : 0;
const pattern_lower = pattern.toLowerCase()

const a_includes = a_name.includes(pattern_lower);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmstick would indexOf be better here? We could also sort by "how close to start" the position is. I think it's probably not worth doing unless folks still feel the result order needs improving.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultimately, I've planned to switch to using the levenshtein distance algorithm to compare and weight results.

Copy link
Member

@jacobgkau jacobgkau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good improvement to search results. Regression testing passed.
shell-pr753-groovy.txt
shell-pr753-focal.txt

Discovered an unrelated issue #762 while testing (not a regression.)

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

Successfully merging this pull request may close these issues.

Launcher search results are sometimes not great
3 participants