Skip to content

Commit 2bcd381

Browse files
committed
enhance remove extremly high score on exact match
1 parent 8a6da0c commit 2bcd381

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/internals/search/search.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const (
2222
SUBSTRING_BOOST = 0.5
2323

2424
// limits
25-
MAX_STRING_SCORE = 5.0
25+
MAX_STRING_SCORE = 1.0
2626
MIN_SCORE_THRESHOLD = 0.2
2727
)
2828

@@ -121,11 +121,6 @@ func stringScore(query, target string) float64 {
121121
simScore += SUBSTRING_BOOST
122122
}
123123

124-
// clamp the final score
125-
if simScore > MAX_STRING_SCORE {
126-
return MAX_STRING_SCORE
127-
}
128-
129124
return simScore
130125
}
131126

0 commit comments

Comments
 (0)