feat: delete doc only if valid name is provided

This commit is contained in:
Shivam Mishra 2020-08-10 14:24:00 +05:30
parent 579f5dfc8b
commit 8d71dad60b

View file

@ -55,6 +55,9 @@ class FullTextSearch:
self (object): FullTextSearch Instance
doc_name (str): name of the document to be removed
"""
if not doc_name:
return
ix = self.get_index()
with ix.searcher():
writer = ix.writer()