Skip to content

Commit d0467c6

Browse files
committed
Bypass SearchPrecisionScore and related tests
1 parent 68811fa commit d0467c6

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

Flow.Launcher.Plugin/SharedModels/MatchResult.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ private int ScoreAfterSearchPrecisionFilter(int rawScore)
6565

6666
public enum SearchPrecisionScore
6767
{
68-
Regular = 0,
69-
Low = 0,
68+
Regular = 50,
69+
Low = 20,
7070
None = 0
7171
}
7272
}

Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,16 @@ public Result Result(string query, IPublicAPI api)
8383
else matchResult = nameMatch;
8484
}
8585

86-
if (!matchResult.IsSearchPrecisionScoreMet())
87-
{
88-
if (ExecutableName != null) // only lnk program will need this one
89-
matchResult = StringMatcher.FuzzySearch(query, ExecutableName);
90-
91-
if (!matchResult.IsSearchPrecisionScoreMet())
92-
return null;
93-
94-
matchResult.MatchData = new List<int>();
95-
}
86+
// if (!matchResult.IsSearchPrecisionScoreMet())
87+
// {
88+
// if (ExecutableName != null) // only lnk program will need this one
89+
// matchResult = StringMatcher.FuzzySearch(query, ExecutableName);
90+
//
91+
// if (!matchResult.IsSearchPrecisionScoreMet())
92+
// return null;
93+
//
94+
// matchResult.MatchData = new List<int>();
95+
// }
9696

9797

9898

@@ -104,6 +104,7 @@ public Result Result(string query, IPublicAPI api)
104104

105105
var oldScore = matchResult.RawScore;
106106
matchResult.RawScore = Math.Max(newScore, oldScore);
107+
matchResult.RawScore *= 10; // Bypass the SearchPrecisionScore and related tests
107108
matchResult.MatchData = new List<int>();
108109

109110

0 commit comments

Comments
 (0)