also trim custom transform value

This commit is contained in:
byte[] 2019-11-15 13:30:44 -05:00
parent 69c03f483d
commit 54fd5f3c47

View file

@ -169,7 +169,7 @@ defmodule Search.Parser do
defp field_top(parser, tokens), do: field_term(parser, tokens)
defp field_term(parser, [custom_field: field_name, range: :eq, value: value]) do
case parser.transforms[field_name].(parser.__data__, value) do
case parser.transforms[field_name].(parser.__data__, String.trim(value)) do
{:ok, child} ->
{:ok, {child, []}}