diff --git a/vectordbs/qdrant.py b/vectordbs/qdrant.py index 2be69597..4c667468 100644 --- a/vectordbs/qdrant.py +++ b/vectordbs/qdrant.py @@ -45,7 +45,7 @@ async def convert_to_rerank_format(self, chunks: List[rest.PointStruct]): { "content": chunk.payload.get("content"), "page_label": chunk.payload.get("page_label"), - "file_url": chunk.payload.get("file_url"), + "doc_url": chunk.payload.get("doc_url"), } for chunk in chunks ] @@ -92,22 +92,12 @@ async def query(self, input: str, top_k: int = MAX_QUERY_TOP_K) -> List: ] async def delete(self, file_url: str) -> None: - # client.count( - # collection_name="{collection_name}", - # count_filter=models.Filter( - # must=[ - # models.FieldCondition(key="color", match=models.MatchValue(value="red")), - # ] - # ), - # exact=True, - # ) - deleted_chunks = self.client.count( collection_name=self.index_name, count_filter=rest.Filter( must=[ rest.FieldCondition( - key="file_url", match=rest.MatchValue(value=file_url) + key="doc_url", match=rest.MatchValue(value=file_url) ) ] ), @@ -120,7 +110,7 @@ async def delete(self, file_url: str) -> None: filter=rest.Filter( must=[ rest.FieldCondition( - key="file_url", match=rest.MatchValue(value=file_url) + key="doc_url", match=rest.MatchValue(value=file_url) ) ] )