summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-06-01 13:27:28 +0100
committerErik Johnston <erik@matrix.org>2017-06-01 13:28:01 +0100
commitd5477c7afd884f200c55a1c6a187983756f49577 (patch)
tree3ee6028c18d5c3935de45fb7851089f05413f132 /synapse
parentTweak search query (diff)
downloadsynapse-d5477c7afd884f200c55a1c6a187983756f49577.tar.xz
Tweak search query
Diffstat (limited to 'synapse')
-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 ?