mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-22 13:45:05 -05:00
Index contains_url for file search queries
This commit is contained in:
parent
c94de0ab60
commit
0b32bb20bb
@ -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):
|
||||
|
17
synapse/storage/schema/delta/35/contains_url.sql
Normal file
17
synapse/storage/schema/delta/35/contains_url.sql
Normal file
@ -0,0 +1,17 @@
|
||||
/* Copyright 2016 OpenMarket Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
INSERT into background_updates (update_name, progress_json)
|
||||
VALUES ('event_contains_url_index', '{}');
|
Loading…
Reference in New Issue
Block a user