There was an error while loading. Please reload this page.
1 parent c6623cb commit ad6d1efCopy full SHA for ad6d1ef
1 file changed
app/src/ingestion/rag_utils.py
@@ -26,10 +26,9 @@ def populate_vector_db() -> None:
26
27
# Clear existing collection if any
28
if doc_store.count_documents() > 0:
29
- logger.info("Deleting existing vector DB collection=%r", collection_name)
30
- chroma_client.delete_collection(collection_name)
31
- # Re-create the document store after deletion
32
- doc_store = config.chroma_document_store()
+ # Don't delete collection since it's referenced by existing pipelines upon their startup
+ logger.info("Clearing out existing vector DB collection=%r", collection_name)
+ doc_store.delete_all_documents()
33
34
# Download files from S3
35
local_folder = download_s3_folder_to_local()
0 commit comments