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

Improve the fuzzy results #2

Closed
mneuhaus opened this issue Feb 27, 2014 · 5 comments
Closed

Improve the fuzzy results #2

mneuhaus opened this issue Feb 27, 2014 · 5 comments

Comments

@mneuhaus
Copy link

After a few minutes of fuzzy finding in a project of my i noticed, that often the file i wanted to find was listed often lower than 4-6th place. similar files and searches
end up around 1-3rd place most of the time in SublimeText.
I just skimmed over the code. you already seem to use a score algorithm similar to (https://github.com/joshaven/string_score). I know that PeepOpen used to work quite well as is opensource now. Maybe that'll help improve this? :)

https://github.com/topfunky/PeepOpen
http://code.tutsplus.com/tutorials/vim-essential-plugin-peepopen--net-19824

FuzzyMatching
https://github.com/topfunky/PeepOpen/blob/master/Classes/Models/FuzzyRecord.rb#L268-L427

@amccloud
Copy link
Contributor

@mneuhaus Can you give me an example if your input, the path you are matching, and the path you should be matching.

I've already started work on improving the results for atom/fuzzy-finder#10

@mneuhaus
Copy link
Author

did some more detailed testing, it doesn't deviate that extremely, but here are 2 examples:


Additionally, i have the feeling, that Sublime "tracks" which files you open often and gives them a bit higher score

@corbanbrook
Copy link

atom/fuzzy-finder#21 I opened this issue on Atom Fuzzy finder with some recommendations for predicting the best file for the user. I believe most of these are outside the scope of the fuzzaldrin project as it focuses on fuzzy string matching only (correct me if I am wrong). Perhaps it could be extended to support option for hinting/filtering/sorting callbacks.

My view is that in order for atom to intelligently sort/predict best files to users we need to go beyond string match scoring. Some ideas include to sort dot files or gitignore files at lower priority, last modified date as higher priorities, filter out already opened files, siblings of already opened files at higher priority to name a few.

@hkdobrev
Copy link

@mneuhaus

Additionally, i have the feeling, that Sublime "tracks" which files you open often and gives them a bit higher score

I think Sublime does the scoring the same, but it scrolls the list automatically to the last used. It actually remembers amount of pairs of the strings entered and the files chosen. So if you've entered a short string like "ab" and choose some lower file like "foobazbar", the next time you enter "ab" it will scroll to this file directly. I am not sure if it does this every time.

@probablycorey
Copy link

It looks like this was discussed and closed in atom/fuzzy-finder#10. If there are any problems related to this I would be 😄 if another issue was opened with specific examples.

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

No branches or pull requests

5 participants