atom / fuzzaldrin

Fuzzy filtering and string scoring
MIT License
319 stars 28 forks source link

Improve the fuzzy results #2

Closed mneuhaus closed 10 years ago

mneuhaus commented 10 years ago

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 commented 10 years ago

@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 commented 10 years ago

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 commented 10 years ago

https://github.com/atom/fuzzy-finder/issues/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 commented 10 years ago

@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 commented 10 years ago

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