mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Put tranlate query back to fuzzy search until better solution
This commit is contained in:
parent
fb25d54112
commit
80a2f0df71
2 changed files with 3 additions and 3 deletions
|
|
@ -50,6 +50,7 @@ namespace Flow.Launcher.Infrastructure
|
|||
|
||||
if (_alphabet != null)
|
||||
{
|
||||
query = _alphabet.Translate(query);
|
||||
stringToCompare = _alphabet.Translate(stringToCompare);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -78,15 +78,14 @@ namespace Flow.Launcher.Plugin.Program
|
|||
uwps = _uwps;
|
||||
}
|
||||
|
||||
var searchText = WordsHelper.HasChinese(query.Search) ? WordsHelper.GetPinyin(query.Search) : query.Search;
|
||||
|
||||
var results1 = win32.AsParallel()
|
||||
.Where(p => p.Enabled)
|
||||
.Select(p => p.Result(searchText, _context.API));
|
||||
.Select(p => p.Result(query.Search, _context.API));
|
||||
|
||||
var results2 = uwps.AsParallel()
|
||||
.Where(p => p.Enabled)
|
||||
.Select(p => p.Result(searchText, _context.API));
|
||||
.Select(p => p.Result(query.Search, _context.API));
|
||||
|
||||
var result = results1.Concat(results2).Where(r => r != null && r.Score > 0).ToList();
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Reference in a new issue