mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-05 15:27:53 +10:00
Implement flush for search backend after remove command
This commit is contained in:
@@ -45,4 +45,11 @@ def query_search_index(text: str) -> List:
|
||||
return backend.search(text)
|
||||
else:
|
||||
return []
|
||||
|
||||
|
||||
@enforce_types
|
||||
def flush_search_index(snapshot_ids: List[str]):
|
||||
if not indexing_enabled() or not snapshot_ids:
|
||||
return
|
||||
backend = import_backend()
|
||||
backend.flush(snapshot_ids)
|
||||
|
||||
Reference in New Issue
Block a user