feat: delete doc only if valid name is provided
This commit is contained in:
parent
579f5dfc8b
commit
8d71dad60b
1 changed files with 3 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue