diff --git a/lib/search/evaluator.ex b/lib/search/evaluator.ex index ecd1d3bc..aa1f4fdc 100644 --- a/lib/search/evaluator.ex +++ b/lib/search/evaluator.ex @@ -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)