diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-03-29 23:05:33 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-03-29 23:17:12 +0100 |
commit | 2fe3f848b92ee9493a724935167fad84678a7eb2 (patch) | |
tree | f826f14cef84cc40f5921ae5844468274d1e299a /synapse/storage/search.py | |
parent | Merge pull request #3043 from matrix-org/erikj/measure_state_group_creation (diff) | |
download | synapse-2fe3f848b92ee9493a724935167fad84678a7eb2.tar.xz |
Remove uses of events.content
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/search.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/search.py b/synapse/storage/search.py index 984643b057..426cbe6e1a 100644 --- a/synapse/storage/search.py +++ b/synapse/storage/search.py @@ -75,8 +75,9 @@ class SearchStore(BackgroundUpdateStore): def reindex_search_txn(txn): sql = ( - "SELECT stream_ordering, event_id, room_id, type, content, " + "SELECT stream_ordering, event_id, room_id, type, json, " " origin_server_ts FROM events" + " JOIN event_json USING (event_id)" " WHERE ? <= stream_ordering AND stream_ordering < ?" " AND (%s)" " ORDER BY stream_ordering DESC" @@ -104,7 +105,8 @@ class SearchStore(BackgroundUpdateStore): stream_ordering = row["stream_ordering"] origin_server_ts = row["origin_server_ts"] try: - content = json.loads(row["content"]) + event_json = json.loads(row["json"]) + content = event_json["content"] except Exception: continue |