[#477] User search tests. Normalized search rank in User.search.
This commit is contained in:
parent
fc965f982c
commit
5b8f9ff8c1
2 changed files with 58 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue