mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
prevent crash on gallery_id query in filter, fixes #99
This commit is contained in:
parent
551fed5b0d
commit
1ef368c286
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue