aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2019-01-15 13:05:25 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2019-01-15 13:05:25 +0300
commit5b8f9ff8c14b5992e3db7a0c890ca5539e6a0086 (patch)
treefd845dda0aea9466f0280f6f51ced697f6a6c1d8 /lib
parentfc965f982c62c43e11cb42c77f7c371c9835a9f2 (diff)
downloadpleroma-5b8f9ff8c14b5992e3db7a0c890ca5539e6a0086.tar.gz
[#477] User search tests. Normalized search rank in User.search.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/user.ex3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index 52638b446..2488697bb 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -704,7 +704,8 @@ defmodule Pleroma.User do
ts_rank_cd(
setweight(to_tsvector('simple', regexp_replace(nickname, '\\W', ' ', 'g')), 'A') ||
setweight(to_tsvector('simple', regexp_replace(coalesce(name, ''), '\\W', ' ', 'g')), 'B'),
- to_tsquery('simple', ?)
+ to_tsquery('simple', ?),
+ 32
)
""",
^processed_query