deanishe / alfred-repos

Browse, search and open Git repositories in Alfred

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow min_score of the filter to be configured

matthewmcgarvey opened this issue · comments

The min_score set on the filter currently is 30. https://github.com/deanishe/alfred-repos/blob/master/src/repos.py#L296

I find this to not work with the way I fuzzily type out repos. I believe it is set as it is for speed if there are a lot of repos to search through, so I'm wondering if this could be moved to the json config. Maybe the option would be: optimize_for and the default would be speed which would translate to the min_score of 30 but the other option would be search or something of that nature and remove the min_score.

If speed is not what that is there for, I'd love to know why.

I believe it is set as it is for speed

It has little effect on speed. It's just set that high to reduce the number of poor matches. Change min_score to 0 if you want "anything that contains these characters in this order" semantics.

so I'm wondering if this could be moved to the json config.

At this point, I'd probably put the option in the workflow configuration sheet.

Maybe the option would be: optimize_for and the default would be speed which would translate to the min_score of 30 but the other option would be search

Why not just let the user specify min_score directly instead of only two possible values?

I expect min_score to not be very understandable for someone who just wants their fuzzy searches to show up. Seeing as this has not been an issue for anyone else in the years it has been like this, I think I'll just close the issue. Thanks!

I expect min_score to not be very understandable for someone who just wants their fuzzy searches to show up

It wouldn't be an issue in a workflow aimed at developers, like this one.