Improved search results for localized nickname match
- Improved search results for localized nickname match.
select similarity('hj@shigusegubu.club', 'hj');
is 0.15
which is too low, considering that search query is the exact localized nickname (hj
).
- Tweaked user search to rank nickname matches higher than name matches.
Reasoning: nickname is unique (per domain) and name is not. If someone names oneself HJ
(which will give similarity score 1
for name), hj@shigusegubu.club
will still be ranked higher (with 0.15
for full nickname match plus 1
for localized nickname match).
-
Fixed
users_fts_index
usage (the index wasn't used), removed unused trigram index onusers
. -
Fixed matching by leading fragment of user domain (
hj@shigusegubu.club
is now returned among results forshigu
).
Relates to #1570 (closed)
Edited by Ivan Tashkinov