summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-04-25 15:32:04 +0100
committerErik Johnston <erik@matrix.org>2018-04-25 15:32:04 +0100
commit22881b3d692f44696189a1e0eeb6e83999dae10c (patch)
tree8e2a21e7c8bac1cdd67fdbe8abc09e3e85315535 /synapse
parentFix quarantine media admin API (diff)
downloadsynapse-22881b3d692f44696189a1e0eeb6e83999dae10c.tar.xz
Also fix reindexing of search
Diffstat (limited to 'synapse')
-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 426cbe6e1a..6ba3e59889 100644
--- a/synapse/storage/search.py
+++ b/synapse/storage/search.py
@@ -77,7 +77,7 @@ class SearchStore(BackgroundUpdateStore):
             sql = (
                 "SELECT stream_ordering, event_id, room_id, type, json, "
                 " origin_server_ts FROM events"
-                " JOIN event_json USING (event_id)"
+                " JOIN event_json USING (room_id, event_id)"
                 " WHERE ? <= stream_ordering AND stream_ordering < ?"
                 " AND (%s)"
                 " ORDER BY stream_ordering DESC"