Skip to content

Commit c56c023

Browse files
authored
Merge pull request #24 from fairpm/fix_case_sensitivity
2 parents 2b73af1 + a3a5442 commit c56c023

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/Services/PluginServices/QueryPluginsService.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static function applySearchWeighted(
8080
return $query
8181
->where(fn($q) => $q
8282
->where('slug', $search)
83-
->orWhere('name', 'like', "$search%")
83+
->orWhere('name', 'ilike', "$search%")
8484
->orWhereRaw("slug %> ?", [$wordchars])
8585
->orWhereRaw("name %> ?", [$wordchars])
8686
->orWhereRaw("short_description %> ?", [$wordchars])
@@ -90,8 +90,8 @@ public static function applySearchWeighted(
9090
CASE
9191
WHEN slug = ? THEN 1000000
9292
WHEN name = ? THEN 900000
93-
WHEN slug LIKE ? THEN 800000
94-
WHEN name LIKE ? THEN 700000
93+
WHEN slug ILIKE ? THEN 800000
94+
WHEN name ILIKE ? THEN 700000
9595
WHEN slug %> ? THEN 600000
9696
WHEN name %> ? THEN 500000
9797
WHEN short_description %> ? THEN 400000

0 commit comments

Comments
 (0)