diff --git a/lib/plausible/site/admin.ex b/lib/plausible/site/admin.ex index 062a4430a..1e8f75f97 100644 --- a/lib/plausible/site/admin.ex +++ b/lib/plausible/site/admin.ex @@ -1,6 +1,13 @@ defmodule Plausible.SiteAdmin do use Plausible.Repo + def search_fields(_schema) do + [ + :domain, + members: [:name, :email] + ] + end + def custom_index_query(_conn, _schema, query) do from(r in query, preload: [:members]) end @@ -18,7 +25,7 @@ defmodule Plausible.SiteAdmin do domain: nil, timezone: nil, public: nil, - members: %{value: fn s -> Enum.map(s.members, & &1.email) end} + members: %{value: fn s -> Enum.map(s.members, & &1.email) |> Enum.join(", ") end} ] end end