From 561cd02ec730f874b39a3da8eb93986d634e0145 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Wed, 25 Feb 2026 07:54:59 +0000 Subject: [PATCH] Fixes error in matching multiple colums during search --- lib/music_library/records.ex | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/music_library/records.ex b/lib/music_library/records.ex index d7c76b3b..018b7899 100644 --- a/lib/music_library/records.ex +++ b/lib/music_library/records.ex @@ -99,8 +99,7 @@ defmodule MusicLibrary.Records do search |> where( fragment( - "records_search_index MATCH 'artists : ' || ? OR records_search_index MATCH 'normalized_artists : ' || ?", - ^escaped_artist, + "records_search_index MATCH '{artists normalized_artists} : ' || ?", ^escaped_artist ) ) @@ -111,8 +110,7 @@ defmodule MusicLibrary.Records do search |> where( fragment( - "records_search_index MATCH 'title : ' || ? OR records_search_index MATCH 'normalized_title : ' || ?", - ^escaped_album, + "records_search_index MATCH '{title normalized_title} : ' || ?", ^escaped_album ) )