fix: remove document from dataset error when vector index npe (#489)

This commit is contained in:
John Wang 2023-06-29 13:09:22 +08:00 committed by GitHub
parent b9b0866a46
commit da04ff040b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,6 +41,7 @@ def remove_document_from_index_task(document_id: str):
kw_index = IndexBuilder.get_index(dataset, 'economy')
# delete from vector index
if vector_index:
vector_index.delete_by_document_id(document.id)
# delete from keyword index