Implement flush for search backend after remove command

This commit is contained in:
JDC 2020-11-19 16:45:12 -05:00 committed by Nick Sweeting
parent c2c01af3ad
commit 47daa038eb
5 changed files with 21 additions and 7 deletions

View file

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