summary refs log tree commit diff
path: root/synapse/storage/search.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-10-16 11:24:02 +0100
committerErik Johnston <erik@matrix.org>2015-10-16 11:24:02 +0100
commit73260ad01f067495e541a936eef4a14ba2fea5ec (patch)
tree9c3e48126e0a5ed7d4e8b51a9ff89d8fe8229ebb /synapse/storage/search.py
parentSplit up run_upgrade (diff)
downloadsynapse-73260ad01f067495e541a936eef4a14ba2fea5ec.tar.xz
Comment on the LIMIT 500
Diffstat (limited to 'synapse/storage/search.py')
-rw-r--r--synapse/storage/search.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/storage/search.py b/synapse/storage/search.py
index 1b987161e2..7d642e18ff 100644
--- a/synapse/storage/search.py
+++ b/synapse/storage/search.py
@@ -54,6 +54,8 @@ class SearchStore(SQLBaseStore):
         for clause in clauses:
             sql += " AND " + clause
 
+        # We add an arbitrary limit here to ensure we don't try to pull the
+        # entire table from the database.
         sql += " ORDER BY rank DESC LIMIT 500"
 
         results = yield self._execute(