summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-11-12 15:19:56 +0000
committerErik Johnston <erik@matrix.org>2015-11-12 15:19:56 +0000
commit764e79d0514a0cce9dc456df0355108d40dbeda8 (patch)
tree7606290ebbccf0f368223a2471f637894780dfaf
parentFix SQL syntax (diff)
downloadsynapse-764e79d0514a0cce9dc456df0355108d40dbeda8.tar.xz
Comment
-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 e1911e2480..0b00ddb9db 100644
--- a/synapse/storage/search.py
+++ b/synapse/storage/search.py
@@ -252,6 +252,8 @@ class SearchStore(BackgroundUpdateStore):
                 " WHERE vector @@ query AND room_id = ?"
             )
         elif isinstance(self.database_engine, Sqlite3Engine):
+            # We use CROSS JOIN here to ensure we use the right indexes.
+            # https://sqlite.org/optoverview.html#crossjoin
             sql = (
                 "SELECT rank(matchinfo) as rank, room_id, event_id,"
                 " topological_ordering, stream_ordering"