actually rvert those changes
This commit is contained in:
parent
8d11bae0d5
commit
6604bea9d0
1 changed files with 10 additions and 14 deletions
|
@ -404,22 +404,18 @@ defmodule Pleroma.User 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
|
||||||
|
|
Loading…
Reference in a new issue