Make search match all artists attribute

Ignores the fact that artists is a JSON structure - just treats it as a
giant piece of text.
This commit is contained in:
Claudio Ortolina
2024-09-26 16:32:01 +01:00
parent cebc50e107
commit 95164cd977
+1 -1
View File
@@ -23,7 +23,7 @@ defmodule MusicLibrary.Records do
q =
from r in Record,
where: like(r.title, ^"%#{query}%") or like(r.artists[0]["name"], ^"%#{query}%"),
where: like(r.title, ^"%#{query}%") or like(r.artists, ^"%#{query}%"),
order_by: [r.artists[0]["sort_name"], r.title],
limit: ^limit,
offset: ^offset