mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-27 13:14:24 -04:00
Implement flush for search backend after remove command
This commit is contained in:
parent
c2c01af3ad
commit
47daa038eb
5 changed files with 21 additions and 7 deletions
|
@ -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)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue