Skip to content

Commit 5f49297

Browse files
authored
Fix type errors on QdrantDocumentStore (#1041)
The QdrantDocumentStore did not properly implement the DocumentStore protocol.
1 parent e1c0fc3 commit 5f49297

File tree

1 file changed

+4
-4
lines changed
  • integrations/qdrant/src/haystack_integrations/document_stores/qdrant

1 file changed

+4
-4
lines changed

integrations/qdrant/src/haystack_integrations/document_stores/qdrant/document_store.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def write_documents(
334334
self,
335335
documents: List[Document],
336336
policy: DuplicatePolicy = DuplicatePolicy.FAIL,
337-
):
337+
) -> int:
338338
"""
339339
Writes documents to Qdrant using the specified policy.
340340
The QdrantDocumentStore can handle duplicate documents based on the given policy.
@@ -358,7 +358,7 @@ def write_documents(
358358

359359
if len(documents) == 0:
360360
logger.warning("Calling QdrantDocumentStore.write_documents() with empty list")
361-
return
361+
return 0
362362

363363
document_objects = self._handle_duplicate_documents(
364364
documents=documents,
@@ -383,13 +383,13 @@ def write_documents(
383383
progress_bar.update(self.write_batch_size)
384384
return len(document_objects)
385385

386-
def delete_documents(self, ids: List[str]):
386+
def delete_documents(self, document_ids: List[str]) -> None:
387387
"""
388388
Deletes documents that match the provided `document_ids` from the document store.
389389
390390
:param document_ids: the document ids to delete
391391
"""
392-
ids = [convert_id(_id) for _id in ids]
392+
ids = [convert_id(_id) for _id in document_ids]
393393
try:
394394
self.client.delete(
395395
collection_name=self.index,

0 commit comments

Comments
 (0)