Skip to content

Commit

Permalink
Returned 0 since we were always returning 10 anyways
Browse files Browse the repository at this point in the history
  • Loading branch information
scohen committed Apr 23, 2024
1 parent 9929f65 commit 462cbb3
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ defmodule Lexical.RemoteControl.Search.Fuzzy.Scorer do
end

@tail_match_boost 55
@max_match_boost_boost 10

defp match_boost(
%__MODULE__{} = score,
Expand All @@ -204,8 +203,7 @@ defmodule Lexical.RemoteControl.Search.Fuzzy.Scorer do
# and the pattern matches the most local parts
@tail_match_boost
else
# penalize first matches further in the string by making them negative.
max(0 - first_match_position, @max_match_boost_boost)
0
end
end

Expand Down

0 comments on commit 462cbb3

Please sign in to comment.