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

search files by name imperfect tokenization #116021

Closed
image72 opened this issue Feb 7, 2021 · 8 comments
Closed

search files by name imperfect tokenization #116021

image72 opened this issue Feb 7, 2021 · 8 comments

Comments

@image72
Copy link

image72 commented Feb 7, 2021

  • VSCode Version:1.53.0
  • OS Version:Darwin x64 17.7.0

Version: 1.53.0
Commit: 8490d3d
Date: 2021-02-03T16:01:04.046Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Darwin x64 17.7.0
Steps to Reproduce:

  1. open search files by name palette
  2. example:

search project files by name, type interview man means I want search interview man start serial files, but search result list imperfect
image

search file name include route, result list
image

Does this issue occur when all extensions are disabled?: Yes

sorry, I'm not good at english.

@image72
Copy link
Author

image72 commented Feb 7, 2021

keyword should have minimal match weight? //just my ideas only

rank 1 should view in result list index 1,
not match should dismiss

@gjsjohnmurray
Copy link
Contributor

See #99171 (comment)

Try interviewman instead of interview man

@gjsjohnmurray
Copy link
Contributor

@bpasero is there a way that a contiguous match in the path can be made to outrank a non-contiguous match in the name (see second screenshot)?

@image72
Copy link
Author

image72 commented Feb 7, 2021

See #99171 (comment)

Try interviewman instead of interview man

But, interview man means I want fuzzy search with two keyword first interview & second man maybe [interview] [fireman], [woman], [manager] or another includes
Start match, End match, middle match, full match, partition match

@image72
Copy link
Author

image72 commented Feb 8, 2021

image

@gjsjohnmurray
Copy link
Contributor

The implementation is at https://github.com/microsoft/vscode/blob/master/src/vs/base/common/fuzzyScorer.ts

By entering interview man you are requiring both interview AND man to score > 0. In your latest screenshot see how the matches that you boxed with yellow qualify by containing the letters m, a and n somewhere in one of the components (path, name), even though those letters appear in a different sequence.

@image72
Copy link
Author

image72 commented Feb 8, 2021

thanks for your explain.

@bpasero
Copy link
Member

bpasero commented Feb 9, 2021

Related #25925

@gjsjohnmurray

is there a way that a contiguous match in the path can be made to outrank a non-contiguous match in the name (see second screenshot)?

Currently not.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants