diff --git a/integrations/mongodb_atlas/src/haystack_integrations/document_stores/mongodb_atlas/document_store.py b/integrations/mongodb_atlas/src/haystack_integrations/document_stores/mongodb_atlas/document_store.py index 68c02522e..eec889243 100644 --- a/integrations/mongodb_atlas/src/haystack_integrations/document_stores/mongodb_atlas/document_store.py +++ b/integrations/mongodb_atlas/src/haystack_integrations/document_stores/mongodb_atlas/document_store.py @@ -86,13 +86,11 @@ def from_dict(cls, data: Dict[str, Any]) -> "MongoDBAtlasDocumentStore": deserialize_secrets_inplace(data["init_parameters"], keys=["mongo_connection_string"]) return default_from_dict(cls, data) - def count_documents(self, filters: Optional[Dict[str, Any]] = None) -> int: + def count_documents(self) -> int: """ Returns how many documents are present in the document store. - - :param filters: The filters to apply. It counts only the documents that match the filters. """ - return self.collection.count_documents(filters or {}) + return self.collection.count_documents({}) def filter_documents(self, filters: Optional[Dict[str, Any]] = None) -> List[Document]: """