update empty document caused delete exist collection (#6392)

This commit is contained in:
Jyong 2024-07-17 20:38:32 +08:00 committed by GitHub
parent 65bc4e0fc0
commit 443e96777b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,6 +46,7 @@ def document_indexing_update_task(dataset_id: str, document_id: str):
index_processor = IndexProcessorFactory(index_type).init_index_processor()
segments = db.session.query(DocumentSegment).filter(DocumentSegment.document_id == document_id).all()
if segments:
index_node_ids = [segment.index_node_id for segment in segments]
# delete from vector index