Commit 6604bea9 authored by normandy's avatar normandy
Browse files

actually rvert those changes

parent 8d11bae0
...@@ -404,22 +404,18 @@ def search(query, resolve) do ...@@ -404,22 +404,18 @@ def search(query, resolve) do
from( from(
u in User, u in User,
select_merge: %{ select_merge: %{
search_distance: search_distance: fragment(
fragment( "? <-> (? || ?)",
"? <-> (? || ?)", ^query,
^query, u.nickname,
u.nickname, u.name
u.name )}
)
}
) )
q = q = from(s in subquery(inner),
from( order_by: s.search_distance,
s in subquery(inner), limit: 20
order_by: s.search_distance, )
limit: 20
)
Repo.all(q) Repo.all(q)
end end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment