summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/user_directory.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/user_directory.py b/synapse/storage/user_directory.py
index c2ea261289..4fe30ce72e 100644
--- a/synapse/storage/user_directory.py
+++ b/synapse/storage/user_directory.py
@@ -284,7 +284,7 @@ class UserDirectoryStore(SQLBaseStore):
                 INNER JOIN user_directory USING (user_id)
                 WHERE vector @@ to_tsquery('english', ?)
                 ORDER BY
-                    ts_rank_cd(vector, to_tsquery('english', ?)) DESC,
+                    ts_rank_cd(vector, to_tsquery('english', ?), 1) DESC,
                     display_name IS NULL,
                     avatar_url IS NULL
                 LIMIT ?