summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-10-13 15:50:56 +0100
committerErik Johnston <erik@matrix.org>2015-10-13 15:50:56 +0100
commit7ecd11accb68cc0f20e7ab84673df38413ba7cf7 (patch)
treeaf186787d60c6c3421c7800ee6d43eeb134a4576 /synapse/storage
parentRemove constraints in preperation of using filters (diff)
downloadsynapse-7ecd11accb68cc0f20e7ab84673df38413ba7cf7.tar.xz
Add paranoia limit
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/search.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/search.py b/synapse/storage/search.py
index 7a30ce25eb..1b987161e2 100644
--- a/synapse/storage/search.py
+++ b/synapse/storage/search.py
@@ -54,7 +54,7 @@ class SearchStore(SQLBaseStore):
         for clause in clauses:
             sql += " AND " + clause
 
-        sql += " ORDER BY rank DESC"
+        sql += " ORDER BY rank DESC LIMIT 500"
 
         results = yield self._execute(
             "search_msgs", self.cursor_to_dict, sql, *([search_term] + args)