prevent crash on gallery_id query in filter, fixes #99

This commit is contained in:
byte[] 2020-04-29 22:44:03 -04:00
parent 551fed5b0d
commit 1ef368c286

View file

@ -64,6 +64,11 @@ defmodule Search.Evaluator do
|> Enum.any?(&String.contains?(&1, query_val))
end
def hits?(doc, %{nested: _}) do
# No way to tell without a wildly expensive database query
false
end
def hits?(doc, %{term: term_query}) do
[{term, query_val}] = Enum.to_list(term_query)