diff options
author | Erik Johnston <erikj@jki.re> | 2016-09-13 09:06:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-13 09:06:16 +0100 |
commit | ba6bc2faa0d216c9961a02e70b7a02b91c5ae28d (patch) | |
tree | 63ee96059229cf02ddf35f5c3b5ee750d1c7a6ea /synapse/storage/events.py | |
parent | Merge pull request #1108 from matrix-org/erikj/create_dm (diff) | |
parent | Remove where clause (diff) | |
download | synapse-ba6bc2faa0d216c9961a02e70b7a02b91c5ae28d.tar.xz |
Merge pull request #1109 from matrix-org/erikj/partial_indices
Add WHERE clause support to index creation
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r-- | synapse/storage/events.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index ed182c8d11..6dc46fa50f 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -189,6 +189,14 @@ class EventsStore(SQLBaseStore): self._background_reindex_fields_sender, ) + self.register_background_index_update( + "event_contains_url_index", + index_name="event_contains_url_index", + table="events", + columns=["room_id", "topological_ordering", "stream_ordering"], + where_clause="contains_url = true AND outlier = false", + ) + self._event_persist_queue = _EventPeristenceQueue() def persist_events(self, events_and_contexts, backfilled=False): |