Make the fuzzy searching flexible by passing in the fuzzy matcher - #18270
Conversation
| public const int MinimumDistance = 5; | ||
| internal readonly uint MinimumDistance; | ||
|
|
||
| internal FuzzyMatcher(uint minimumDistance = 5) |
There was a problem hiding this comment.
Given that we now expose setting the min distance in the cmdlet, I wonder if we should change this to 3 instead of 5 to get more reasonable results and likely a bucket 3 breaking change
There was a problem hiding this comment.
It turns out we don't need to declare a default value for this parameter.
The -FuzzyMinimumDistance in Get-Command is 5 by default, are you suggesting changing it to 3? I think it makes sense, and will make the change.
There was a problem hiding this comment.
I changed the default min distance back to 5 because the change caused a test to fail -- pwsh.exe is expected to return for pwsw on Windows by default. I guess we need to improve the fuzzy matcher somehow, to ignore the .exe extension
on the to-be-compared string when the reference string doesn't have .exe.
Steve Lee (SteveL-MSFT)
left a comment
There was a problem hiding this comment.
LGTM, just one question to consider
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
PR Summary
Make the fuzzy searching flexible by passing in the fuzzy matcher instead of using the
SearchResolutionOptions.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.