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

Fix for Unexpected priority of search results for 'term' #3874

Merged

Conversation

alekhyareddy28
Copy link
Contributor

Summary of the Pull Request

Take space into consideration while calculating the first matched index.

PR Checklist

Detailed Description of the Pull Request / Additional comments

  • The query term was showing up CharacterMap before Windows Terminal because the first match index in terminal was 8 whereas it was 6 for characterMap.
  • To mitigate this issue, setting the first start index relative to the preceeding space. This way windows terminal gets a higher weightage as the first match index is now 0.

Validation Steps Performed

image

  • Task Manager would have previously got a low score. However, now it is higher as we are giving preference to the fact that it is the start of a new word.

image

@alekhyareddy28 alekhyareddy28 added the Product-PowerToys Run Improved app launch PT Run (Win+R) Window label May 29, 2020
@alekhyareddy28 alekhyareddy28 requested a review from a team May 29, 2020 18:31
@crutkas
Copy link
Member

crutkas commented May 29, 2020

@jjw24 and @bao-qian, this change may be helpful for your code bases.

@crutkas
Copy link
Member

crutkas commented May 29, 2020

if we're going to do a hotfix, this may not be a bad PR for that

@jjw24
Copy link
Contributor

jjw24 commented May 29, 2020

Thank you @crutkas for letting me know, really appreciate it.

@crutkas
Copy link
Member

crutkas commented May 29, 2020

Thank you @crutkas for letting me know, really appreciate it.

We’ll continue to flag stuff that could be of use. I think we all should get together and figure out plugin model too.

@jjw24
Copy link
Contributor

jjw24 commented May 30, 2020

Thank you @crutkas for letting me know, really appreciate it.

We’ll continue to flag stuff that could be of use. I think we all should get together and figure out plugin model too.

That would be great and helpful. I agree, glad you are thinking the same too.

Copy link
Contributor

@dsrivastavv dsrivastavv left a comment

Choose a reason for hiding this comment

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

LGTM!

@alekhyareddy28 alekhyareddy28 merged commit a8d67a1 into microsoft:master Jun 1, 2020
alekhyareddy28 added a commit to alekhyareddy28/PowerToys that referenced this pull request Jun 2, 2020
crutkas pushed a commit that referenced this pull request Jun 3, 2020
* Add resource only when it is not already present (#3842)

(cherry picked from commit d2dfbff)

* Take space into consideration while calculating the first matched index (#3874)

(cherry picked from commit a8d67a1)

* Fix for File explorer not showing up and multiple notepads (#3969)

* reverted the dedup code, file explorer shows up but so do duplicates

* Fixed file explorer and dedup

* Formatting

* Added tests for all the cases

* Formatting

* Tests

* take name and exe into consideration while calculating hash

* unique primes while calculating hash code

(cherry picked from commit 8cddd59)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product-PowerToys Run Improved app launch PT Run (Win+R) Window
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants