mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
add fuzzy search score for ordering
This commit is contained in:
parent
5d7102eadb
commit
8a86bf7496
1 changed files with 8 additions and 1 deletions
|
|
@ -83,7 +83,14 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
return results;
|
||||
|
||||
return results
|
||||
.Where(x => StringMatcher.FuzzySearch(searchName, x.Title).IsSearchPrecisionScoreMet())
|
||||
.Where(x =>
|
||||
{
|
||||
var matchResult = StringMatcher.FuzzySearch(searchName, x.Title);
|
||||
if (matchResult.IsSearchPrecisionScoreMet())
|
||||
x.Score = matchResult.Score;
|
||||
|
||||
return matchResult.IsSearchPrecisionScoreMet();
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue