我有这样的话:“Fábrica,mágico”全文搜索没有返回,尽管其余部分正常工作。
我的代码是(使用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
如何解决这个问题?