I have these words: "Fábrica, mágico" that full text search is not returning although the rest is working properly.
My code is (using Elixir lang):
def search(query, search_term) do
(from u in query,
where: fragment("(to_tsvector('portuguese', ?) || to_tsvector(coalesce('portuguese', ?))) @@ plainto_tsquery('portuguese', ?)",
u.name, u.desc, ^search_term),
order_by: fragment("ts_rank((to_tsvector('portuguese', ?) || to_tsvector(coalesce('portuguese', ?))), plainto_tsquery('portuguese', ?)) DESC",
u.name, u.desc, ^search_term))
end
How to solve this?