summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-11-12 15:33:47 +0000
committerErik Johnston <erik@matrix.org>2015-11-12 15:33:47 +0000
commit8fd8e72cec8df94403441664d8eecc25fa8d363f (patch)
tree4e6c3a73a9a61263dc9b605be7eb1517c1649328 /synapse/storage
parentComment (diff)
downloadsynapse-8fd8e72cec8df94403441664d8eecc25fa8d363f.tar.xz
Expand comment
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/search.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/storage/search.py b/synapse/storage/search.py

index 0b00ddb9db..dcc5ac65a3 100644 --- a/synapse/storage/search.py +++ b/synapse/storage/search.py
@@ -254,6 +254,12 @@ class SearchStore(BackgroundUpdateStore): elif isinstance(self.database_engine, Sqlite3Engine): # We use CROSS JOIN here to ensure we use the right indexes. # https://sqlite.org/optoverview.html#crossjoin + # + # We want to use the full text search index on event_search to + # extract all possible matches first, then lookup those matches + # in the events table to get the topological ordering. We need + # to use the indexes in this order because sqlite refuses to + # MATCH unless it uses the full text search index sql = ( "SELECT rank(matchinfo) as rank, room_id, event_id," " topological_ordering, stream_ordering"