This repository was archived by the owner on Mar 13, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
backend/modules/vector_db Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 88from langchain .embeddings .base import Embeddings
99from langchain_community .vectorstores import Chroma
1010
11- from backend .constants import DATA_POINT_FQN_METADATA_KEY , DEFAULT_BATCH_SIZE_FOR_VECTOR_STORE
11+ from backend .constants import (
12+ DATA_POINT_FQN_METADATA_KEY ,
13+ DEFAULT_BATCH_SIZE_FOR_VECTOR_STORE ,
14+ )
1215from backend .logger import logger
1316from backend .modules .vector_db .base import BaseVectorDB
1417from backend .types import ChromaVectorDBConfig , DataPointVector
@@ -104,7 +107,6 @@ def upsert_documents(
104107 for doc in documents
105108 if doc .metadata .get (DATA_POINT_FQN_METADATA_KEY )
106109 ]
107-
108110
109111 def delete_documents (self , collection_name : str , document_ids : List [str ]):
110112 # Fetch the collection
Original file line number Diff line number Diff line change @@ -154,18 +154,16 @@ def upsert_documents(
154154 )
155155
156156 # Delete old documents
157-
157+
158158 # If there are no record ids to be upserted, return
159159 if not len (record_ids_to_be_upserted ):
160160 return
161-
161+
162162 logger .debug (
163163 f"[Qdrant] Deleting { len (documents )} outdated documents from collection { collection_name } "
164164 )
165165 for i in range (0 , len (record_ids_to_be_upserted ), BATCH_SIZE ):
166- record_ids_to_be_processed = record_ids_to_be_upserted [
167- i : i + BATCH_SIZE
168- ]
166+ record_ids_to_be_processed = record_ids_to_be_upserted [i : i + BATCH_SIZE ]
169167 self .qdrant_client .delete (
170168 collection_name = collection_name ,
171169 points_selector = models .PointIdsList (
@@ -420,4 +418,3 @@ def list_document_vector_points(
420418 f"[Qdrant] Listing { len (document_vector_points )} document vector points for collection { collection_name } "
421419 )
422420 return document_vector_points
423-
You can’t perform that action at this time.
0 commit comments