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:
@@ -23,7 +23,7 @@ defmodule MusicLibrary.Records do
|
|||||||
|
|
||||||
q =
|
q =
|
||||||
from r in Record,
|
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],
|
order_by: [r.artists[0]["sort_name"], r.title],
|
||||||
limit: ^limit,
|
limit: ^limit,
|
||||||
offset: ^offset
|
offset: ^offset
|
||||||
|
|||||||
Reference in New Issue
Block a user