Index contains_url for file search queries

This commit is contained in:
Erik Johnston 2016-09-12 16:57:05 +01:00
parent c94de0ab60
commit 0b32bb20bb
2 changed files with 25 additions and 0 deletions

View file

@ -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):