mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:16:09 -04:00
Use a background task to update databases to use the full text search
This commit is contained in:
parent
36c58b18a3
commit
90b503216c
2 changed files with 25 additions and 77 deletions
|
@ -37,8 +37,8 @@ class SearchStore(BackgroundUpdateStore):
|
|||
|
||||
@defer.inlineCallbacks
|
||||
def _background_reindex_search(self, progress, batch_size):
|
||||
target_min_stream_id = progress["target_min_stream_id"]
|
||||
max_stream_id = progress["max_stream_id"]
|
||||
target_min_stream_id = progress["target_min_stream_id_inclusive"]
|
||||
max_stream_id = progress["max_stream_id_exclusive"]
|
||||
rows_inserted = progress.get("rows_inserted", 0)
|
||||
|
||||
INSERT_CLUMP_SIZE = 1000
|
||||
|
@ -105,8 +105,8 @@ class SearchStore(BackgroundUpdateStore):
|
|||
txn.execute_many(sql, clump)
|
||||
|
||||
progress = {
|
||||
"target_max_stream_id": target_min_stream_id,
|
||||
"max_stream_id": min_stream_id,
|
||||
"target_min_stream_id_inclusive": target_min_stream_id,
|
||||
"max_stream_id_exclusive": min_stream_id,
|
||||
"rows_inserted": rows_inserted + len(event_search_rows)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue