Support accented artists search

This commit is contained in:
Claudio Ortolina
2025-07-06 10:11:46 +01:00
parent c3a4eb56d1
commit 37f28a7011
+2 -1
View File
@@ -64,7 +64,8 @@ defmodule MusicLibrary.Search do
q =
from ar in ArtistRecord,
where: fragment("lower(artist ->> '$.name') LIKE ?", ^"%#{normalized_query}%"),
where:
fragment("lower(unaccent(artist ->> '$.name')) LIKE ?", ^"%#{normalized_query}%"),
group_by: ar.musicbrainz_id,
select: ar.artist,
limit: ^limit,