From 9d8e86c60ba5e92ffc147a9de0d54faa92bd7793 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Fri, 30 Jan 2026 14:26:51 +0100 Subject: [PATCH 01/54] removing test_delete_all_documents from PgVector - already in haystack.testing --- integrations/pgvector/tests/test_document_store.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/integrations/pgvector/tests/test_document_store.py b/integrations/pgvector/tests/test_document_store.py index ab7a94bfc8..05ce60e644 100644 --- a/integrations/pgvector/tests/test_document_store.py +++ b/integrations/pgvector/tests/test_document_store.py @@ -53,13 +53,6 @@ def test_connection_check_and_recreation(self, document_store: PgvectorDocumentS same_connection = document_store._connection assert same_connection is document_store._connection - def test_delete_all_documents(self, document_store: PgvectorDocumentStore) -> None: - document_store.write_documents([Document(id=str(i)) for i in range(10)]) - document_store.delete_all_documents() - assert document_store.count_documents() == 0 - document_store.write_documents([Document(id="1")]) - assert document_store.count_documents() == 1 - def test_invalid_connection_string(self, monkeypatch): monkeypatch.setenv("PG_CONN_STR", "invalid_connection_string") document_store = PgvectorDocumentStore() From 209fbd44b4a34c83a47fae8ca817d254def245d0 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Fri, 30 Jan 2026 19:17:22 +0100 Subject: [PATCH 02/54] removing duplicated tests from OpenSearchDocumentStore --- .../opensearch/tests/test_document_store.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/integrations/opensearch/tests/test_document_store.py b/integrations/opensearch/tests/test_document_store.py index 145949be55..81756a5292 100644 --- a/integrations/opensearch/tests/test_document_store.py +++ b/integrations/opensearch/tests/test_document_store.py @@ -523,22 +523,6 @@ def test_delete_all_documents_index_recreation(self, document_store: OpenSearchD assert len(results) == 1 assert results[0].content == "New document after delete all" - def test_delete_all_documents_no_index_recreation(self, document_store: OpenSearchDocumentStore): - docs = [Document(id="1", content="A first document"), Document(id="2", content="Second document")] - document_store.write_documents(docs) - assert document_store.count_documents() == 2 - - document_store.delete_all_documents(recreate_index=False, refresh=True) - assert document_store.count_documents() == 0 - - new_doc = Document(id="3", content="New document after delete all") - document_store.write_documents([new_doc]) - assert document_store.count_documents() == 1 - - results = document_store.filter_documents() - assert len(results) == 1 - assert results[0].content == "New document after delete all" - def test_delete_by_filter(self, document_store: OpenSearchDocumentStore): docs = [ Document(content="Doc 1", meta={"category": "A"}), From 67691fce0867995315a77bca4359ee63e48289c7 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Fri, 30 Jan 2026 19:22:51 +0100 Subject: [PATCH 03/54] removing duplicated tests from ElasticStoreDocumentTest --- .../elasticsearch/tests/test_document_store.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/integrations/elasticsearch/tests/test_document_store.py b/integrations/elasticsearch/tests/test_document_store.py index 1699f9823a..83c12fe310 100644 --- a/integrations/elasticsearch/tests/test_document_store.py +++ b/integrations/elasticsearch/tests/test_document_store.py @@ -501,22 +501,6 @@ def test_delete_all_documents_index_recreation(self, document_store: Elasticsear assert len(results) == 1 assert results[0].content == "New document after delete all" - def test_delete_all_documents_no_index_recreation(self, document_store: ElasticsearchDocumentStore): - docs = [Document(id="1", content="A first document"), Document(id="2", content="Second document")] - document_store.write_documents(docs) - assert document_store.count_documents() == 2 - - document_store.delete_all_documents(recreate_index=False, refresh=True) - assert document_store.count_documents() == 0 - - new_doc = Document(id="3", content="New document after delete all") - document_store.write_documents([new_doc]) - assert document_store.count_documents() == 1 - - results = document_store.filter_documents() - assert len(results) == 1 - assert results[0].content == "New document after delete all" - def test_delete_by_filter(self, document_store: ElasticsearchDocumentStore): docs = [ Document(content="Doc 1", meta={"category": "A"}), From ac86e25a1a83edb4d29cd96d0495366f9453c3bb Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Tue, 3 Feb 2026 13:05:58 +0100 Subject: [PATCH 04/54] removing test_delete_all_documents from weaviate --- integrations/weaviate/tests/test_document_store.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/integrations/weaviate/tests/test_document_store.py b/integrations/weaviate/tests/test_document_store.py index 47623cb89b..3037fe5aba 100644 --- a/integrations/weaviate/tests/test_document_store.py +++ b/integrations/weaviate/tests/test_document_store.py @@ -797,13 +797,6 @@ def test_connect_to_embedded(self): document_store = WeaviateDocumentStore(embedded_options=EmbeddedOptions()) assert document_store.client - def test_delete_all_documents(self, document_store): - docs = [Document(content="test doc 1"), Document(content="test doc 2")] - assert document_store.write_documents(docs) == 2 - assert document_store.count_documents() == 2 - document_store.delete_all_documents() - assert document_store.count_documents() == 0 - def test_delete_all_documents_recreate(self, document_store): docs = [Document(content="test doc 1"), Document(content="test doc 2")] assert document_store.write_documents(docs) == 2 From f98868994a7a18ae1f0d1112f7900e29754b1544 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Tue, 3 Feb 2026 15:02:20 +0100 Subject: [PATCH 05/54] removing test_delete_all_documents from qdrant --- integrations/qdrant/tests/test_document_store.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/integrations/qdrant/tests/test_document_store.py b/integrations/qdrant/tests/test_document_store.py index 15c9525e2f..0232d77607 100644 --- a/integrations/qdrant/tests/test_document_store.py +++ b/integrations/qdrant/tests/test_document_store.py @@ -302,20 +302,6 @@ def test_set_up_collection_with_dimension_mismatch(self): with pytest.raises(ValueError, match="different vector size"): document_store._set_up_collection("test_collection", 768, False, "cosine", False, False) - def test_delete_all_documents_no_index_recreation(self, document_store): - document_store._initialize_client() - - # write some documents - docs = [Document(id=str(i)) for i in range(5)] - document_store.write_documents(docs) - - # delete all documents without recreating the index - document_store.delete_all_documents(recreate_index=False) - assert document_store.count_documents() == 0 - - # ensure the collection still exists by writing documents again - document_store.write_documents(docs) - assert document_store.count_documents() == 5 def test_delete_all_documents_index_recreation(self, document_store): document_store._initialize_client() From db6988055294a8efb40a15d7b4d3d75e0c32672a Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Tue, 3 Feb 2026 15:06:14 +0100 Subject: [PATCH 06/54] removing delete_all_documents tests from PineCone --- integrations/pinecone/tests/test_document_store.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/integrations/pinecone/tests/test_document_store.py b/integrations/pinecone/tests/test_document_store.py index 3f949efac3..78942e317d 100644 --- a/integrations/pinecone/tests/test_document_store.py +++ b/integrations/pinecone/tests/test_document_store.py @@ -279,19 +279,6 @@ def test_write_documents_duplicate_skip(self, document_store: PineconeDocumentSt @pytest.mark.skip(reason="Pinecone creates a namespace only when the first document is written") def test_delete_documents_empty_document_store(self, document_store: PineconeDocumentStore): ... - def test_delete_all_documents(self, document_store: PineconeDocumentStore): - docs = [Document(content="first doc"), Document(content="second doc")] - document_store.write_documents(docs) - assert document_store.count_documents() == 2 - - document_store.delete_all_documents() - assert document_store.count_documents() == 0 - - def test_delete_all_documents_empty_collection(self, document_store: PineconeDocumentStore): - assert document_store.count_documents() == 0 - document_store.delete_all_documents() - assert document_store.count_documents() == 0 - def test_embedding_retrieval(self, document_store: PineconeDocumentStore): query_embedding = [0.1] * 768 most_similar_embedding = [0.8] * 768 From aafc759205a56eed8030a3e66b13a4aea45b4092 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Tue, 3 Feb 2026 15:38:00 +0100 Subject: [PATCH 07/54] removing delete_all_documents tests from MondoDBDocumentStore --- .../mongodb_atlas/tests/test_document_store.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/integrations/mongodb_atlas/tests/test_document_store.py b/integrations/mongodb_atlas/tests/test_document_store.py index 1eefda46f3..5f58c38a61 100644 --- a/integrations/mongodb_atlas/tests/test_document_store.py +++ b/integrations/mongodb_atlas/tests/test_document_store.py @@ -1,6 +1,7 @@ # SPDX-FileCopyrightText: 2023-present deepset GmbH # # SPDX-License-Identifier: Apache-2.0 + import os from unittest.mock import patch from uuid import uuid4 @@ -386,18 +387,6 @@ def test_update_by_filter(self, document_store: MongoDBAtlasDocumentStore): assert len(unpublished_docs) == 1 assert "status" not in unpublished_docs[0].meta - def test_delete_all_documents(self, document_store: MongoDBAtlasDocumentStore): - docs = [Document(id="1", content="first doc"), Document(id="2", content="second doc")] - document_store.write_documents(docs) - assert document_store.count_documents() == 2 - document_store.delete_all_documents() - assert document_store.count_documents() == 0 - - def test_delete_all_documents_empty_collection(self, document_store: MongoDBAtlasDocumentStore): - assert document_store.count_documents() == 0 - document_store.delete_all_documents() - assert document_store.count_documents() == 0 - def test_delete_all_documents_with_recreate_collection(self, document_store: MongoDBAtlasDocumentStore): docs = [Document(id="1", content="first doc"), Document(id="2", content="second doc")] document_store.write_documents(docs) From 4d264244a7bb61fbfe1fc8d52fdde5d3f8aea83e Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Tue, 3 Feb 2026 16:03:58 +0100 Subject: [PATCH 08/54] adding check for empty list for delete_all_documents on Chroma --- .../document_stores/chroma/document_store.py | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/integrations/chroma/src/haystack_integrations/document_stores/chroma/document_store.py b/integrations/chroma/src/haystack_integrations/document_stores/chroma/document_store.py index 2ec0cf7b66..a3fdad2990 100644 --- a/integrations/chroma/src/haystack_integrations/document_stores/chroma/document_store.py +++ b/integrations/chroma/src/haystack_integrations/document_stores/chroma/document_store.py @@ -701,12 +701,13 @@ def delete_all_documents(self, *, recreate_index: bool = False) -> None: else: collection = self._collection.get() ids = collection.get("ids", []) - self._collection.delete(ids=ids) # type: ignore - logger.info( - "Deleted all the {n_docs} documents from the collection '{name}'.", - name=self._collection_name, - n_docs=len(ids), - ) + if ids: + self._collection.delete(ids=ids) # type: ignore + logger.info( + "Deleted all the {n_docs} documents from the collection '{name}'.", + name=self._collection_name, + n_docs=len(ids), + ) except Exception as e: msg = f"Failed to delete all documents from ChromaDB: {e!s}" raise DocumentStoreError(msg) from e @@ -740,12 +741,13 @@ async def delete_all_documents_async(self, *, recreate_index: bool = False) -> N else: collection = await self._async_collection.get() ids = collection.get("ids", []) - await self._async_collection.delete(ids=ids) # type: ignore - logger.info( - "Deleted all the {n_docs} documents from the collection '{name}'.", - name=self._collection_name, - n_docs=len(ids), - ) + if ids: + await self._async_collection.delete(ids=ids) # type: ignore + logger.info( + "Deleted all the {n_docs} documents from the collection '{name}'.", + name=self._collection_name, + n_docs=len(ids), + ) except Exception as e: msg = f"Failed to delete all documents from ChromaDB: {e!s}" From fa8543dc0cc7c9ed4490c6e2f3461f142fa7c858 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Tue, 3 Feb 2026 16:33:57 +0100 Subject: [PATCH 09/54] removing delete_all_documents tests from AzureAISearchDocumentStore --- .../azure_ai_search/tests/test_document_store.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/integrations/azure_ai_search/tests/test_document_store.py b/integrations/azure_ai_search/tests/test_document_store.py index 069f5bb99b..44faa9ca7c 100644 --- a/integrations/azure_ai_search/tests/test_document_store.py +++ b/integrations/azure_ai_search/tests/test_document_store.py @@ -290,18 +290,6 @@ def test_write_documents_duplicate_fail(self, document_store: AzureAISearchDocum @pytest.mark.skip(reason="Azure AI search index overwrites duplicate documents by default") def test_write_documents_duplicate_skip(self, document_store: AzureAISearchDocumentStore): ... - def test_delete_all_documents(self, document_store: AzureAISearchDocumentStore): - docs = [Document(content="first doc"), Document(content="second doc")] - document_store.write_documents(docs) - assert document_store.count_documents() == 2 - document_store.delete_all_documents() - assert document_store.count_documents() == 0 - - def test_delete_all_documents_empty_index(self, document_store: AzureAISearchDocumentStore): - assert document_store.count_documents() == 0 - document_store.delete_all_documents() - assert document_store.count_documents() == 0 - @pytest.mark.parametrize( "document_store", [{"metadata_fields": {"category": str}}], From f942fb661d61953146ab85a4f2eab450787fb6af Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Tue, 3 Feb 2026 17:40:11 +0100 Subject: [PATCH 10/54] fixing Pinecone tests --- integrations/pinecone/tests/conftest.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/integrations/pinecone/tests/conftest.py b/integrations/pinecone/tests/conftest.py index 726f36f06f..e0d7885cfd 100644 --- a/integrations/pinecone/tests/conftest.py +++ b/integrations/pinecone/tests/conftest.py @@ -56,7 +56,8 @@ def delete_documents_and_wait(filters): yield store try: - store._index.delete(delete_all=True, namespace=namespace) + if store._index is not None: + store._index.delete(delete_all=True, namespace=namespace) except NotFoundException: pass @@ -98,7 +99,8 @@ async def delete_documents_and_wait_async(filters): yield store try: - await store._async_index.delete(delete_all=True, namespace=namespace) - await store.close_async() + if store._async_index is not None: + await store._async_index.delete(delete_all=True, namespace=namespace) + await store.close_async() except NotFoundException: pass From 5e1bc28dc70fd61842d7dd34196033c92a1e4362 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Tue, 3 Feb 2026 20:17:50 +0100 Subject: [PATCH 11/54] cleaning up tests in qdrant and weaviate --- .../qdrant/tests/test_document_store.py | 182 +----------------- .../weaviate/tests/test_document_store.py | 25 --- 2 files changed, 3 insertions(+), 204 deletions(-) diff --git a/integrations/qdrant/tests/test_document_store.py b/integrations/qdrant/tests/test_document_store.py index 0232d77607..8f5f789fdd 100644 --- a/integrations/qdrant/tests/test_document_store.py +++ b/integrations/qdrant/tests/test_document_store.py @@ -8,6 +8,7 @@ from haystack.testing.document_store import ( CountDocumentsTest, DeleteDocumentsTest, + UpdateByFilterTest, WriteDocumentsTest, _random_embeddings, ) @@ -22,7 +23,7 @@ ) -class TestQdrantDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest): +class TestQdrantDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, UpdateByFilterTest): @pytest.fixture def document_store(self) -> QdrantDocumentStore: return QdrantDocumentStore( @@ -325,184 +326,7 @@ def test_delete_all_documents_index_recreation(self, document_store): # ensure the collection still exists by writing documents again document_store.write_documents(docs) assert document_store.count_documents() == 5 - - def test_delete_by_filter(self, document_store: QdrantDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "year": 2023}), - Document(content="Doc 2", meta={"category": "B", "year": 2023}), - Document(content="Doc 3", meta={"category": "A", "year": 2024}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - deleted_count = document_store.delete_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "A"} - ) - assert deleted_count == 2 - - # Verify only category B remains - remaining_docs = document_store.filter_documents() - assert len(remaining_docs) == 1 - assert remaining_docs[0].meta["category"] == "B" - - # Delete remaining document by year - deleted_count = document_store.delete_by_filter(filters={"field": "meta.year", "operator": "==", "value": 2023}) - assert deleted_count == 1 - assert document_store.count_documents() == 0 - - def test_delete_by_filter_no_matches(self, document_store: QdrantDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A"}), - Document(content="Doc 2", meta={"category": "B"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 2 - - # try to delete documents with category="C" (no matches) - deleted_count = document_store.delete_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "C"} - ) - assert deleted_count == 0 - assert document_store.count_documents() == 2 - - def test_delete_by_filter_advanced_filters(self, document_store: QdrantDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "year": 2023, "status": "draft"}), - Document(content="Doc 2", meta={"category": "A", "year": 2024, "status": "published"}), - Document(content="Doc 3", meta={"category": "B", "year": 2023, "status": "draft"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # AND condition (matches only Doc 1) - deleted_count = document_store.delete_by_filter( - filters={ - "operator": "AND", - "conditions": [ - {"field": "meta.category", "operator": "==", "value": "A"}, - {"field": "meta.year", "operator": "==", "value": 2023}, - ], - } - ) - assert deleted_count == 1 - assert document_store.count_documents() == 2 - - # OR condition (matches Doc 2 and Doc 3) - deleted_count = document_store.delete_by_filter( - filters={ - "operator": "OR", - "conditions": [ - {"field": "meta.category", "operator": "==", "value": "B"}, - {"field": "meta.status", "operator": "==", "value": "published"}, - ], - } - ) - assert deleted_count == 2 - assert document_store.count_documents() == 0 - - def test_update_by_filter(self, document_store: QdrantDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "status": "draft"}), - Document(content="Doc 2", meta={"category": "B", "status": "draft"}), - Document(content="Doc 3", meta={"category": "A", "status": "draft"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # Update status for category="A" documents - updated_count = document_store.update_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "A"}, meta={"status": "published"} - ) - assert updated_count == 2 - - # Verify the updated documents have the new metadata - published_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "published"} - ) - assert len(published_docs) == 2 - for doc in published_docs: - assert doc.meta["status"] == "published" - assert doc.meta["category"] == "A" - - # Verify documents with category="B" were not updated - draft_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "draft"} - ) - assert len(draft_docs) == 1 - assert draft_docs[0].meta["category"] == "B" - - def test_update_by_filter_multiple_fields(self, document_store: QdrantDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "year": 2023}), - Document(content="Doc 2", meta={"category": "A", "year": 2023}), - Document(content="Doc 3", meta={"category": "B", "year": 2024}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # Update multiple fields for category="A" documents - updated_count = document_store.update_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "A"}, - meta={"status": "published", "reviewed": True}, - ) - assert updated_count == 2 - - # Verify updates - published_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "published"} - ) - assert len(published_docs) == 2 - for doc in published_docs: - assert doc.meta["status"] == "published" - assert doc.meta["reviewed"] is True - assert doc.meta["category"] == "A" - assert doc.meta["year"] == 2023 # Existing field preserved - - def test_update_by_filter_no_matches(self, document_store: QdrantDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A"}), - Document(content="Doc 2", meta={"category": "B"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 2 - - # Try to update documents with category="C" (no matches) - updated_count = document_store.update_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "C"}, meta={"status": "published"} - ) - assert updated_count == 0 - assert document_store.count_documents() == 2 - - def test_update_by_filter_advanced_filters(self, document_store: QdrantDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "year": 2023, "status": "draft"}), - Document(content="Doc 2", meta={"category": "A", "year": 2024, "status": "draft"}), - Document(content="Doc 3", meta={"category": "B", "year": 2023, "status": "draft"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # Update with AND condition - updated_count = document_store.update_by_filter( - filters={ - "operator": "AND", - "conditions": [ - {"field": "meta.category", "operator": "==", "value": "A"}, - {"field": "meta.year", "operator": "==", "value": 2023}, - ], - }, - meta={"status": "published"}, - ) - assert updated_count == 1 - - # Verify only one document was updated - published_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "published"} - ) - assert len(published_docs) == 1 - assert published_docs[0].meta["category"] == "A" - assert published_docs[0].meta["year"] == 2023 - + def test_update_by_filter_preserves_vectors(self, document_store: QdrantDocumentStore): """Test that update_by_filter preserves document embeddings.""" docs = [ diff --git a/integrations/weaviate/tests/test_document_store.py b/integrations/weaviate/tests/test_document_store.py index 3037fe5aba..48b8492ebe 100644 --- a/integrations/weaviate/tests/test_document_store.py +++ b/integrations/weaviate/tests/test_document_store.py @@ -837,37 +837,12 @@ def test_delete_by_filter(self, document_store): document_store.write_documents(docs) assert document_store.count_documents() == 3 - # Delete documents with category="TypeA" deleted_count = document_store.delete_by_filter( filters={"field": "meta.category", "operator": "==", "value": "TypeA"} ) assert deleted_count == 2 assert document_store.count_documents() == 1 - def test_update_by_filter(self, document_store): - docs = [ - Document(content="Doc 1", meta={"category": "TypeA", "status": "draft"}), - Document(content="Doc 2", meta={"category": "TypeB", "status": "draft"}), - Document(content="Doc 3", meta={"category": "TypeA", "status": "draft"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # Update status for category="TypeA" documents - updated_count = document_store.update_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "TypeA"}, meta={"status": "published"} - ) - assert updated_count == 2 - - # Verify the updates - published_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "published"} - ) - assert len(published_docs) == 2 - for doc in published_docs: - assert doc.meta["category"] == "TypeA" - assert doc.meta["status"] == "published" - def test_update_by_filter_with_pagination(self, document_store, monkeypatch): # Reduce DEFAULT_QUERY_LIMIT to test pagination without creating 10000+ documents monkeypatch.setattr("haystack_integrations.document_stores.weaviate.document_store.DEFAULT_QUERY_LIMIT", 100) From 9b8d9ed8f08ac282a5b037315811353910313ee1 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Tue, 3 Feb 2026 22:06:16 +0100 Subject: [PATCH 12/54] removing more weavite delete_by_filter tests --- .../weaviate/tests/test_document_store.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/integrations/weaviate/tests/test_document_store.py b/integrations/weaviate/tests/test_document_store.py index 48b8492ebe..25fb91c1d5 100644 --- a/integrations/weaviate/tests/test_document_store.py +++ b/integrations/weaviate/tests/test_document_store.py @@ -828,21 +828,6 @@ def test_delete_all_documents_excessive_batch_size(self, document_store, caplog) assert document_store.count_documents() == 5 assert "Not all documents have been deleted." in caplog.text - def test_delete_by_filter(self, document_store): - docs = [ - Document(content="Doc 1", meta={"category": "TypeA"}), - Document(content="Doc 2", meta={"category": "TypeB"}), - Document(content="Doc 3", meta={"category": "TypeA"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - deleted_count = document_store.delete_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "TypeA"} - ) - assert deleted_count == 2 - assert document_store.count_documents() == 1 - def test_update_by_filter_with_pagination(self, document_store, monkeypatch): # Reduce DEFAULT_QUERY_LIMIT to test pagination without creating 10000+ documents monkeypatch.setattr("haystack_integrations.document_stores.weaviate.document_store.DEFAULT_QUERY_LIMIT", 100) From a81ebe10d3d9f9e76e3e580f150fa32d95860680 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Tue, 3 Feb 2026 22:44:47 +0100 Subject: [PATCH 13/54] cleaning up tests in pgvector --- .../pgvector/tests/test_document_store.py | 218 +----------------- 1 file changed, 7 insertions(+), 211 deletions(-) diff --git a/integrations/pgvector/tests/test_document_store.py b/integrations/pgvector/tests/test_document_store.py index 05ce60e644..2fa5f9ec1f 100644 --- a/integrations/pgvector/tests/test_document_store.py +++ b/integrations/pgvector/tests/test_document_store.py @@ -9,14 +9,19 @@ from haystack.dataclasses.document import ByteStream, Document from haystack.document_stores.errors import DocumentStoreError, DuplicateDocumentError from haystack.document_stores.types import DuplicatePolicy -from haystack.testing.document_store import CountDocumentsTest, DeleteDocumentsTest, WriteDocumentsTest +from haystack.testing.document_store import ( + CountDocumentsTest, + DeleteDocumentsTest, + WriteDocumentsTest, + UpdateByFilterTest, +) from haystack.utils import Secret from haystack_integrations.document_stores.pgvector import PgvectorDocumentStore @pytest.mark.integration -class TestDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest): +class TestDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, UpdateByFilterTest): def test_write_documents(self, document_store: PgvectorDocumentStore): docs = [Document(id="1")] assert document_store.write_documents(docs) == 1 @@ -255,215 +260,6 @@ def test_delete_table_first_call(document_store): document_store.delete_table() # if throw error, test fails -@pytest.mark.integration -def test_delete_by_filter(document_store: PgvectorDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "year": 2023}), - Document(content="Doc 2", meta={"category": "B", "year": 2023}), - Document(content="Doc 3", meta={"category": "A", "year": 2024}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - deleted_count = document_store.delete_by_filter(filters={"field": "meta.category", "operator": "==", "value": "A"}) - assert deleted_count == 2 - assert document_store.count_documents() == 1 - - remaining_docs = document_store.filter_documents() - assert len(remaining_docs) == 1 - assert remaining_docs[0].meta["category"] == "B" - - deleted_count = document_store.delete_by_filter(filters={"field": "meta.year", "operator": "==", "value": 2023}) - assert deleted_count == 1 - assert document_store.count_documents() == 0 - - -@pytest.mark.integration -def test_delete_by_filter_no_matches(document_store: PgvectorDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A"}), - Document(content="Doc 2", meta={"category": "B"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 2 - - deleted_count = document_store.delete_by_filter(filters={"field": "meta.category", "operator": "==", "value": "C"}) - assert deleted_count == 0 - assert document_store.count_documents() == 2 - - -@pytest.mark.integration -def test_delete_by_filter_advanced_filters(document_store: PgvectorDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "year": 2023, "status": "draft"}), - Document(content="Doc 2", meta={"category": "A", "year": 2024, "status": "published"}), - Document(content="Doc 3", meta={"category": "B", "year": 2023, "status": "draft"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # AND condition - deleted_count = document_store.delete_by_filter( - filters={ - "operator": "AND", - "conditions": [ - {"field": "meta.category", "operator": "==", "value": "A"}, - {"field": "meta.year", "operator": "==", "value": 2023}, - ], - } - ) - assert deleted_count == 1 - assert document_store.count_documents() == 2 - - # OR condition - deleted_count = document_store.delete_by_filter( - filters={ - "operator": "OR", - "conditions": [ - {"field": "meta.category", "operator": "==", "value": "B"}, - {"field": "meta.status", "operator": "==", "value": "published"}, - ], - } - ) - assert deleted_count == 2 - assert document_store.count_documents() == 0 - - -@pytest.mark.integration -def test_update_by_filter(document_store: PgvectorDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "status": "draft"}), - Document(content="Doc 2", meta={"category": "B", "status": "draft"}), - Document(content="Doc 3", meta={"category": "A", "status": "draft"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # update status for category="A" documents - updated_count = document_store.update_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "A"}, meta={"status": "published"} - ) - assert updated_count == 2 - - # verify - published_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "published"} - ) - assert len(published_docs) == 2 - for doc in published_docs: - assert doc.meta["category"] == "A" - assert doc.meta["status"] == "published" - - # Verify category B still has draft status - draft_docs = document_store.filter_documents(filters={"field": "meta.status", "operator": "==", "value": "draft"}) - assert len(draft_docs) == 1 - assert draft_docs[0].meta["category"] == "B" - - -@pytest.mark.integration -def test_update_by_filter_multiple_fields(document_store: PgvectorDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "year": 2023}), - Document(content="Doc 2", meta={"category": "A", "year": 2023}), - Document(content="Doc 3", meta={"category": "B", "year": 2024}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # update multiple fields for category="A" documents - updated_count = document_store.update_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "A"}, - meta={"status": "published", "priority": "high", "reviewed": True}, - ) - assert updated_count == 2 - - # verify - published_docs = document_store.filter_documents(filters={"field": "meta.category", "operator": "==", "value": "A"}) - assert len(published_docs) == 2 - for doc in published_docs: - assert doc.meta["status"] == "published" - assert doc.meta["priority"] == "high" - assert doc.meta["reviewed"] is True - assert doc.meta["year"] == 2023 # Original field should still be present - - # verify category B was not updated - b_docs = document_store.filter_documents(filters={"field": "meta.category", "operator": "==", "value": "B"}) - assert len(b_docs) == 1 - assert "status" not in b_docs[0].meta - assert "priority" not in b_docs[0].meta - - -@pytest.mark.integration -def test_update_by_filter_no_matches(document_store: PgvectorDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A"}), - Document(content="Doc 2", meta={"category": "B"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 2 - - # update documents with category="C" (no matches) - updated_count = document_store.update_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "C"}, meta={"status": "published"} - ) - assert updated_count == 0 - assert document_store.count_documents() == 2 - - # verify no documents were updated - published_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "published"} - ) - assert len(published_docs) == 0 - - -@pytest.mark.integration -def test_update_by_filter_advanced_filters(document_store: PgvectorDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "year": 2023, "status": "draft"}), - Document(content="Doc 2", meta={"category": "A", "year": 2024, "status": "draft"}), - Document(content="Doc 3", meta={"category": "B", "year": 2023, "status": "draft"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # AND condition - updated_count = document_store.update_by_filter( - filters={ - "operator": "AND", - "conditions": [ - {"field": "meta.category", "operator": "==", "value": "A"}, - {"field": "meta.year", "operator": "==", "value": 2023}, - ], - }, - meta={"status": "published"}, - ) - assert updated_count == 1 - - # verify only one document was updated - published_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "published"} - ) - assert len(published_docs) == 1 - assert published_docs[0].meta["category"] == "A" - assert published_docs[0].meta["year"] == 2023 - - # OR condition - updated_count = document_store.update_by_filter( - filters={ - "operator": "OR", - "conditions": [ - {"field": "meta.category", "operator": "==", "value": "B"}, - {"field": "meta.year", "operator": "==", "value": 2024}, - ], - }, - meta={"featured": True}, - ) - assert updated_count == 2 - - featured_docs = document_store.filter_documents(filters={"field": "meta.featured", "operator": "==", "value": True}) - assert len(featured_docs) == 2 - - @pytest.mark.integration def test_update_by_filter_empty_meta_raises_error(document_store: PgvectorDocumentStore): docs = [Document(content="Doc 1", meta={"category": "A"})] From 5e5094ccd7cc4566eb38b10c61f7dd292ba428eb Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Tue, 3 Feb 2026 23:35:40 +0100 Subject: [PATCH 14/54] updating OpenSearch: delete_by_filter_async refresh=True as default --- .../document_stores/opensearch/document_store.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/integrations/opensearch/src/haystack_integrations/document_stores/opensearch/document_store.py b/integrations/opensearch/src/haystack_integrations/document_stores/opensearch/document_store.py index a664704233..045eee178d 100644 --- a/integrations/opensearch/src/haystack_integrations/document_stores/opensearch/document_store.py +++ b/integrations/opensearch/src/haystack_integrations/document_stores/opensearch/document_store.py @@ -730,14 +730,15 @@ async def delete_all_documents_async(self, recreate_index: bool = False, refresh msg = f"Failed to delete all documents from OpenSearch: {e!s}" raise DocumentStoreError(msg) from e - def delete_by_filter(self, filters: dict[str, Any], refresh: bool = False) -> int: + def delete_by_filter(self, filters: dict[str, Any], refresh: bool = True) -> int: """ Deletes all documents that match the provided filters. :param filters: The filters to apply to select documents for deletion. For filter syntax, see [Haystack metadata filtering](https://docs.haystack.deepset.ai/docs/metadata-filtering) :param refresh: If True, OpenSearch refreshes all shards involved in the delete by query after the request - completes. If False, no refresh is performed. For more details, see the + completes so that subsequent reads (e.g. count_documents) see the update. If False, no refresh is + performed (better for bulk deletes). For more details, see the [OpenSearch delete_by_query refresh documentation](https://opensearch.org/docs/latest/api-reference/document-apis/delete-by-query/). :returns: The number of documents deleted. """ @@ -747,6 +748,7 @@ def delete_by_filter(self, filters: dict[str, Any], refresh: bool = False) -> in try: normalized_filters = normalize_filters(filters) body = {"query": {"bool": {"filter": normalized_filters}}} + result = self._client.delete_by_query(index=self._index, body=body, refresh=refresh) deleted_count = result.get("deleted", 0) logger.info( @@ -759,15 +761,15 @@ def delete_by_filter(self, filters: dict[str, Any], refresh: bool = False) -> in msg = f"Failed to delete documents by filter from OpenSearch: {e!s}" raise DocumentStoreError(msg) from e - async def delete_by_filter_async(self, filters: dict[str, Any], refresh: bool = False) -> int: + async def delete_by_filter_async(self, filters: dict[str, Any], refresh: bool = True) -> int: """ Asynchronously deletes all documents that match the provided filters. :param filters: The filters to apply to select documents for deletion. For filter syntax, see [Haystack metadata filtering](https://docs.haystack.deepset.ai/docs/metadata-filtering) :param refresh: If True, OpenSearch refreshes all shards involved in the delete by query after the request - completes. If False, no refresh is performed. For more details, see the - [OpenSearch delete_by_query refresh documentation](https://opensearch.org/docs/latest/api-reference/document-apis/delete-by-query/). + completes so that subsequent reads see the update. If False, no refresh is performed. For more details, + see the [OpenSearch delete_by_query refresh documentation](https://opensearch.org/docs/latest/api-reference/document-apis/delete-by-query/). :returns: The number of documents deleted. """ await self._ensure_initialized_async() From 7f0e42f3c7c2fab168031a407807c59211e48d23 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Wed, 4 Feb 2026 10:01:38 +0100 Subject: [PATCH 15/54] updating OpenSearch: update_by_filter refresh=True as default --- .../opensearch/document_store.py | 2 +- .../opensearch/tests/test_document_store.py | 57 +------------------ .../pinecone/tests/test_document_store.py | 9 ++- 3 files changed, 10 insertions(+), 58 deletions(-) diff --git a/integrations/opensearch/src/haystack_integrations/document_stores/opensearch/document_store.py b/integrations/opensearch/src/haystack_integrations/document_stores/opensearch/document_store.py index 045eee178d..d162e157ce 100644 --- a/integrations/opensearch/src/haystack_integrations/document_stores/opensearch/document_store.py +++ b/integrations/opensearch/src/haystack_integrations/document_stores/opensearch/document_store.py @@ -790,7 +790,7 @@ async def delete_by_filter_async(self, filters: dict[str, Any], refresh: bool = msg = f"Failed to delete documents by filter from OpenSearch: {e!s}" raise DocumentStoreError(msg) from e - def update_by_filter(self, filters: dict[str, Any], meta: dict[str, Any], refresh: bool = False) -> int: + def update_by_filter(self, filters: dict[str, Any], meta: dict[str, Any], refresh: bool = True) -> int: """ Updates the metadata of all documents that match the provided filters. diff --git a/integrations/opensearch/tests/test_document_store.py b/integrations/opensearch/tests/test_document_store.py index 81756a5292..5d10e56e46 100644 --- a/integrations/opensearch/tests/test_document_store.py +++ b/integrations/opensearch/tests/test_document_store.py @@ -9,7 +9,7 @@ from haystack.dataclasses.document import Document from haystack.document_stores.errors import DocumentStoreError, DuplicateDocumentError from haystack.document_stores.types import DuplicatePolicy -from haystack.testing.document_store import CountDocumentsTest, DeleteDocumentsTest, WriteDocumentsTest +from haystack.testing.document_store import CountDocumentsTest, DeleteDocumentsTest, WriteDocumentsTest, UpdateByFilterTest from opensearchpy.exceptions import RequestError from haystack_integrations.document_stores.opensearch import OpenSearchDocumentStore @@ -151,7 +151,7 @@ def test_routing_in_delete(mock_bulk, document_store): @pytest.mark.integration -class TestDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest): +class TestDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, UpdateByFilterTest): """ Common test cases will be provided by `DocumentStoreBaseTests` but you can add more to this class. @@ -523,59 +523,6 @@ def test_delete_all_documents_index_recreation(self, document_store: OpenSearchD assert len(results) == 1 assert results[0].content == "New document after delete all" - def test_delete_by_filter(self, document_store: OpenSearchDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A"}), - Document(content="Doc 2", meta={"category": "B"}), - Document(content="Doc 3", meta={"category": "A"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # Delete documents with category="A" - deleted_count = document_store.delete_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "A"}, refresh=True - ) - assert deleted_count == 2 - assert document_store.count_documents() == 1 - - # Verify only category B remains - remaining_docs = document_store.filter_documents() - assert len(remaining_docs) == 1 - assert remaining_docs[0].meta["category"] == "B" - - def test_update_by_filter(self, document_store: OpenSearchDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "status": "draft"}), - Document(content="Doc 2", meta={"category": "B", "status": "draft"}), - Document(content="Doc 3", meta={"category": "A", "status": "draft"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # Update status for category="A" documents - updated_count = document_store.update_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "A"}, - meta={"status": "published"}, - refresh=True, - ) - assert updated_count == 2 - - # Verify the updates - published_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "published"} - ) - assert len(published_docs) == 2 - for doc in published_docs: - assert doc.meta["category"] == "A" - assert doc.meta["status"] == "published" - - # Verify category B still has draft status - draft_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "draft"} - ) - assert len(draft_docs) == 1 - assert draft_docs[0].meta["category"] == "B" def test_count_documents_by_filter(self, document_store: OpenSearchDocumentStore): docs = [ diff --git a/integrations/pinecone/tests/test_document_store.py b/integrations/pinecone/tests/test_document_store.py index 78942e317d..a46b1b677c 100644 --- a/integrations/pinecone/tests/test_document_store.py +++ b/integrations/pinecone/tests/test_document_store.py @@ -11,7 +11,12 @@ from haystack import Document from haystack.components.preprocessors import DocumentSplitter from haystack.components.retrievers import SentenceWindowRetriever -from haystack.testing.document_store import CountDocumentsTest, DeleteDocumentsTest, WriteDocumentsTest +from haystack.testing.document_store import ( + CountDocumentsTest, + DeleteDocumentsTest, + WriteDocumentsTest, + UpdateByFilterTest, +) from haystack.utils import Secret from pinecone import Pinecone, PodSpec, ServerlessSpec @@ -260,7 +265,7 @@ def test_serverless_index_creation_from_scratch(delete_sleep_time): @pytest.mark.integration @pytest.mark.skipif(not os.environ.get("PINECONE_API_KEY"), reason="PINECONE_API_KEY not set") -class TestDocumentStore(CountDocumentsTest, DeleteDocumentsTest, WriteDocumentsTest): +class TestDocumentStore(CountDocumentsTest, DeleteDocumentsTest, WriteDocumentsTest, UpdateByFilterTest): def test_write_documents(self, document_store: PineconeDocumentStore): docs = [Document(id="1")] assert document_store.write_documents(docs) == 1 From c255ace7e59a9495df2f16193c1cbe7483b1181e Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Wed, 4 Feb 2026 10:16:18 +0100 Subject: [PATCH 16/54] removing standard test from MongoDBDocumentStore --- .../tests/test_document_store.py | 52 ------------------- 1 file changed, 52 deletions(-) diff --git a/integrations/mongodb_atlas/tests/test_document_store.py b/integrations/mongodb_atlas/tests/test_document_store.py index 5f58c38a61..87afdded2b 100644 --- a/integrations/mongodb_atlas/tests/test_document_store.py +++ b/integrations/mongodb_atlas/tests/test_document_store.py @@ -335,58 +335,6 @@ def test_custom_content_field(self): finally: database[collection_name].drop() - def test_delete_by_filter(self, document_store: MongoDBAtlasDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A"}), - Document(content="Doc 2", meta={"category": "B"}), - Document(content="Doc 3", meta={"category": "A"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # Delete documents with category="A" - deleted_count = document_store.delete_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "A"} - ) - assert deleted_count == 2 - assert document_store.count_documents() == 1 - - # Verify the remaining document is the one with category="B" - remaining_docs = document_store.filter_documents() - assert len(remaining_docs) == 1 - assert remaining_docs[0].meta["category"] == "B" - - def test_update_by_filter(self, document_store: MongoDBAtlasDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A"}), - Document(content="Doc 2", meta={"category": "B"}), - Document(content="Doc 3", meta={"category": "A"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # Update documents with category="A" to have status="published" - updated_count = document_store.update_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "A"}, meta={"status": "published"} - ) - assert updated_count == 2 - - # Verify the updated documents have the new metadata - published_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "published"} - ) - assert len(published_docs) == 2 - for doc in published_docs: - assert doc.meta["status"] == "published" - assert doc.meta["category"] == "A" - - # Verify documents with category="B" were not updated - unpublished_docs = document_store.filter_documents( - filters={"field": "meta.category", "operator": "==", "value": "B"} - ) - assert len(unpublished_docs) == 1 - assert "status" not in unpublished_docs[0].meta - def test_delete_all_documents_with_recreate_collection(self, document_store: MongoDBAtlasDocumentStore): docs = [Document(id="1", content="first doc"), Document(id="2", content="second doc")] document_store.write_documents(docs) From ffa3de2d58b59aac6d4d868c0f11accb4991e860 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Wed, 4 Feb 2026 10:41:44 +0100 Subject: [PATCH 17/54] reverting default refresh param in OpenSearch --- .../tests/test_document_store.py | 52 ------------------- .../opensearch/document_store.py | 6 +-- 2 files changed, 3 insertions(+), 55 deletions(-) diff --git a/integrations/elasticsearch/tests/test_document_store.py b/integrations/elasticsearch/tests/test_document_store.py index c4739795fb..2a024ce658 100644 --- a/integrations/elasticsearch/tests/test_document_store.py +++ b/integrations/elasticsearch/tests/test_document_store.py @@ -501,58 +501,6 @@ def test_delete_all_documents_index_recreation(self, document_store: Elasticsear assert len(results) == 1 assert results[0].content == "New document after delete all" - def test_delete_by_filter(self, document_store: ElasticsearchDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A"}), - Document(content="Doc 2", meta={"category": "B"}), - Document(content="Doc 3", meta={"category": "A"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # Delete documents with category="A" - deleted_count = document_store.delete_by_filter( - filters={"field": "category", "operator": "==", "value": "A"}, refresh=True - ) - assert deleted_count == 2 - assert document_store.count_documents() == 1 - - # Verify only category B remains - remaining_docs = document_store.filter_documents() - assert len(remaining_docs) == 1 - assert remaining_docs[0].meta["category"] == "B" - - def test_update_by_filter(self, document_store: ElasticsearchDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "status": "draft"}), - Document(content="Doc 2", meta={"category": "B", "status": "draft"}), - Document(content="Doc 3", meta={"category": "A", "status": "draft"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # Update status for category="A" documents - updated_count = document_store.update_by_filter( - filters={"field": "category", "operator": "==", "value": "A"}, - meta={"status": "published"}, - refresh=True, - ) - assert updated_count == 2 - - # Verify the updates - published_docs = document_store.filter_documents( - filters={"field": "status", "operator": "==", "value": "published"} - ) - assert len(published_docs) == 2 - for doc in published_docs: - assert doc.meta["category"] == "A" - assert doc.meta["status"] == "published" - - # Verify category B still has draft status - draft_docs = document_store.filter_documents(filters={"field": "status", "operator": "==", "value": "draft"}) - assert len(draft_docs) == 1 - assert draft_docs[0].meta["category"] == "B" - def test_count_documents_by_filter(self, document_store: ElasticsearchDocumentStore): docs = [ Document(content="Doc 1", meta={"category": "A", "status": "active"}), diff --git a/integrations/opensearch/src/haystack_integrations/document_stores/opensearch/document_store.py b/integrations/opensearch/src/haystack_integrations/document_stores/opensearch/document_store.py index d162e157ce..450f3a192e 100644 --- a/integrations/opensearch/src/haystack_integrations/document_stores/opensearch/document_store.py +++ b/integrations/opensearch/src/haystack_integrations/document_stores/opensearch/document_store.py @@ -730,7 +730,7 @@ async def delete_all_documents_async(self, recreate_index: bool = False, refresh msg = f"Failed to delete all documents from OpenSearch: {e!s}" raise DocumentStoreError(msg) from e - def delete_by_filter(self, filters: dict[str, Any], refresh: bool = True) -> int: + def delete_by_filter(self, filters: dict[str, Any], refresh: bool = False) -> int: """ Deletes all documents that match the provided filters. @@ -761,7 +761,7 @@ def delete_by_filter(self, filters: dict[str, Any], refresh: bool = True) -> int msg = f"Failed to delete documents by filter from OpenSearch: {e!s}" raise DocumentStoreError(msg) from e - async def delete_by_filter_async(self, filters: dict[str, Any], refresh: bool = True) -> int: + async def delete_by_filter_async(self, filters: dict[str, Any], refresh: bool = False) -> int: """ Asynchronously deletes all documents that match the provided filters. @@ -790,7 +790,7 @@ async def delete_by_filter_async(self, filters: dict[str, Any], refresh: bool = msg = f"Failed to delete documents by filter from OpenSearch: {e!s}" raise DocumentStoreError(msg) from e - def update_by_filter(self, filters: dict[str, Any], meta: dict[str, Any], refresh: bool = True) -> int: + def update_by_filter(self, filters: dict[str, Any], meta: dict[str, Any], refresh: bool = False) -> int: """ Updates the metadata of all documents that match the provided filters. From 8aa003bf62e143fd4bfa42991f834771de100904 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Wed, 4 Feb 2026 10:51:09 +0100 Subject: [PATCH 18/54] removing standard test from Chroma --- .../chroma/tests/test_document_store.py | 85 +------------------ 1 file changed, 2 insertions(+), 83 deletions(-) diff --git a/integrations/chroma/tests/test_document_store.py b/integrations/chroma/tests/test_document_store.py index 1c84793287..cf2a05b2ca 100644 --- a/integrations/chroma/tests/test_document_store.py +++ b/integrations/chroma/tests/test_document_store.py @@ -16,6 +16,7 @@ CountDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, + UpdateByFilterTest, ) from haystack_integrations.document_stores.chroma import ChromaDocumentStore @@ -34,7 +35,7 @@ def clear_chroma_system_cache(): SharedSystemClient.clear_system_cache() -class TestDocumentStore(CountDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest): +class TestDocumentStore(CountDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, UpdateByFilterTest): """ Common test cases will be provided by `DocumentStoreBaseTests` but you can add more to this class. @@ -465,88 +466,6 @@ def test_delete_all_documents_no_index_recreation(self, document_store: ChromaDo assert len(results) == 1 assert results[0].content == "New document after delete all" - def test_delete_by_filter(self, document_store: ChromaDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A"}), - Document(content="Doc 2", meta={"category": "B"}), - Document(content="Doc 3", meta={"category": "A"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # delete documents with category="A" - deleted_count = document_store.delete_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "A"} - ) - assert deleted_count == 2 - assert document_store.count_documents() == 1 - - # verify only category B remains - remaining_docs = document_store.filter_documents() - assert len(remaining_docs) == 1 - assert remaining_docs[0].meta["category"] == "B" - - def test_delete_by_filter_no_matches(self, document_store: ChromaDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A"}), - Document(content="Doc 2", meta={"category": "B"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 2 - - # delete documents with category="C" (no matches) - deleted_count = document_store.delete_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "C"} - ) - assert deleted_count == 0 - assert document_store.count_documents() == 2 - - def test_update_by_filter(self, document_store: ChromaDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "status": "draft"}), - Document(content="Doc 2", meta={"category": "B", "status": "draft"}), - Document(content="Doc 3", meta={"category": "A", "status": "draft"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # update status for category="A" documents - updated_count = document_store.update_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "A"}, meta={"status": "published"} - ) - assert updated_count == 2 - - # verify the updated documents have the new metadata - published_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "published"} - ) - assert len(published_docs) == 2 - for doc in published_docs: - assert doc.meta["status"] == "published" - assert doc.meta["category"] == "A" - - # Verify documents with category="B" were not updated - unpublished_docs = document_store.filter_documents( - filters={"field": "meta.category", "operator": "==", "value": "B"} - ) - assert len(unpublished_docs) == 1 - assert unpublished_docs[0].meta["status"] == "draft" - - def test_update_by_filter_no_matches(self, document_store: ChromaDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A"}), - Document(content="Doc 2", meta={"category": "B"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 2 - - # Try to update documents with category="C" (no matches) - updated_count = document_store.update_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "C"}, meta={"status": "published"} - ) - assert updated_count == 0 - assert document_store.count_documents() == 2 - @pytest.mark.integration def test_search_embeddings(self, document_store: ChromaDocumentStore): query_embedding = TEST_EMBEDDING_1 From 6755b5c2d9bc0856877349901ab95c2271465494 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Wed, 4 Feb 2026 12:50:30 +0100 Subject: [PATCH 19/54] updating AzuresAISearchDocumentStore to make use of base tests --- .../azure_ai_search/filters.py | 12 +- .../azure_ai_search/tests/conftest.py | 5 +- .../tests/test_document_store.py | 129 +++++++----------- 3 files changed, 64 insertions(+), 82 deletions(-) diff --git a/integrations/azure_ai_search/src/haystack_integrations/document_stores/azure_ai_search/filters.py b/integrations/azure_ai_search/src/haystack_integrations/document_stores/azure_ai_search/filters.py index 8dfa854f34..da34e6396b 100644 --- a/integrations/azure_ai_search/src/haystack_integrations/document_stores/azure_ai_search/filters.py +++ b/integrations/azure_ai_search/src/haystack_integrations/document_stores/azure_ai_search/filters.py @@ -68,11 +68,19 @@ def _parse_comparison_condition(condition: dict[str, Any]) -> str: def _eq(field: str, value: Any) -> str: - return f"{field} eq '{value}'" if isinstance(value, str) and value != "null" else f"{field} eq {value}" + if isinstance(value, str) and value != "null": + return f"{field} eq '{value}'" + if isinstance(value, bool): + return f"{field} eq {str(value).lower()}" + return f"{field} eq {value}" def _ne(field: str, value: Any) -> str: - return f"not ({field} eq '{value}')" if isinstance(value, str) and value != "null" else f"not ({field} eq {value})" + if isinstance(value, str) and value != "null": + return f"not ({field} eq '{value}')" + if isinstance(value, bool): + return f"not ({field} eq {str(value).lower()})" + return f"not ({field} eq {value})" def _in(field: str, value: Any) -> str: diff --git a/integrations/azure_ai_search/tests/conftest.py b/integrations/azure_ai_search/tests/conftest.py index 68d654e4d3..af288822f0 100644 --- a/integrations/azure_ai_search/tests/conftest.py +++ b/integrations/azure_ai_search/tests/conftest.py @@ -70,8 +70,9 @@ def delete_by_filter_and_wait(filters): time.sleep(SLEEP_TIME_IN_SECONDS) return deleted_count - def update_by_filter_and_wait(filters, fields): - updated_count = original_update_by_filter(filters, fields) + def update_by_filter_and_wait(filters, meta=None, fields=None, **kwargs): + updates = meta if meta is not None else fields or {} + updated_count = original_update_by_filter(filters, updates) time.sleep(SLEEP_TIME_IN_SECONDS) return updated_count diff --git a/integrations/azure_ai_search/tests/test_document_store.py b/integrations/azure_ai_search/tests/test_document_store.py index 44faa9ca7c..97f7545b5d 100644 --- a/integrations/azure_ai_search/tests/test_document_store.py +++ b/integrations/azure_ai_search/tests/test_document_store.py @@ -15,7 +15,8 @@ CountDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, - WriteDocumentsTest, + UpdateByFilterTest, + WriteDocumentsTest ) from haystack.utils.auth import EnvVarSecret, Secret @@ -256,7 +257,7 @@ def _assert_documents_are_equal(received: list[Document], expected: list[Documen not os.environ.get("AZURE_AI_SEARCH_ENDPOINT", None) and not os.environ.get("AZURE_AI_SEARCH_API_KEY", None), reason="Missing AZURE_AI_SEARCH_ENDPOINT or AZURE_AI_SEARCH_API_KEY.", ) -class TestDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest): +class TestDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, UpdateByFilterTest): def assert_documents_are_equal(self, received: list[Document], expected: list[Document]): _assert_documents_are_equal(received, expected) @@ -296,25 +297,8 @@ def test_write_documents_duplicate_skip(self, document_store: AzureAISearchDocum indirect=True, ) def test_delete_by_filter(self, document_store: AzureAISearchDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A"}), - Document(content="Doc 2", meta={"category": "B"}), - Document(content="Doc 3", meta={"category": "A"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # Delete documents with category="A" - deleted_count = document_store.delete_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "A"} - ) - assert deleted_count == 2 - assert document_store.count_documents() == 1 - - # Verify only category B remains - remaining_docs = document_store.filter_documents() - assert len(remaining_docs) == 1 - assert remaining_docs[0].meta["category"] == "B" + """Override to use a document_store with category metadata field.""" + DeleteDocumentsTest.test_delete_by_filter(document_store) @pytest.mark.parametrize( "document_store", @@ -322,76 +306,65 @@ def test_delete_by_filter(self, document_store: AzureAISearchDocumentStore): indirect=True, ) def test_delete_by_filter_no_matches(self, document_store: AzureAISearchDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A"}), - Document(content="Doc 2", meta={"category": "B"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 2 - - # Try to delete documents with category="C" (no matches) - deleted_count = document_store.delete_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "C"} - ) - assert deleted_count == 0 - assert document_store.count_documents() == 2 + """Override to use a document_store with category metadata field.""" + DeleteDocumentsTest.test_delete_by_filter_no_matches(document_store) @pytest.mark.parametrize( "document_store", - [{"metadata_fields": {"category": str, "status": str}}], + [{"metadata_fields": {"category": str, "year": int, "status": str}}], indirect=True, ) - def test_update_by_filter(self, document_store: AzureAISearchDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "status": "draft"}), - Document(content="Doc 2", meta={"category": "B", "status": "draft"}), - Document(content="Doc 3", meta={"category": "A", "status": "draft"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 + def test_delete_by_filter_advanced_filters(self, document_store: AzureAISearchDocumentStore): + """Override to use a document_store with category, year, status metadata fields.""" + DeleteDocumentsTest.test_delete_by_filter_advanced_filters(document_store) + + # Metadata fields required by haystack UpdateByFilterTest filterable_docs (chapter, name, page, number, date, etc.) + _FILTERABLE_DOCS_METADATA = { + "name": str, + "page": str, + "chapter": str, + "number": int, + "date": str, + "no_embedding": bool, + "updated": bool, + "extra_field": str, + } - # Update status for category="A" documents - updated_count = document_store.update_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "A"}, - fields={"status": "published"}, - ) - assert updated_count == 2 + @pytest.mark.parametrize( + "document_store", + [{"metadata_fields": _FILTERABLE_DOCS_METADATA}], + indirect=True, + ) + def test_update_by_filter(self, document_store: AzureAISearchDocumentStore, filterable_docs): + """Override to use a document_store with metadata fields for filterable_docs.""" + UpdateByFilterTest.test_update_by_filter(document_store, filterable_docs) - # Verify the updates - published_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "published"} - ) - assert len(published_docs) == 2 - for doc in published_docs: - assert doc.meta["category"] == "A" - assert doc.meta["status"] == "published" - - # Verify category B still has draft status - draft_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "draft"} - ) - assert len(draft_docs) == 1 - assert draft_docs[0].meta["category"] == "B" + @pytest.mark.parametrize( + "document_store", + [{"metadata_fields": _FILTERABLE_DOCS_METADATA}], + indirect=True, + ) + def test_update_by_filter_no_matches(self, document_store: AzureAISearchDocumentStore, filterable_docs): + """Override to use a document_store with metadata fields for filterable_docs.""" + UpdateByFilterTest.test_update_by_filter_no_matches(document_store, filterable_docs) @pytest.mark.parametrize( "document_store", - [{"metadata_fields": {"category": str, "status": str}}], + [{"metadata_fields": _FILTERABLE_DOCS_METADATA}], indirect=True, ) - def test_update_by_filter_no_matches(self, document_store: AzureAISearchDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "status": "draft"}), - Document(content="Doc 2", meta={"category": "B", "status": "draft"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 2 + def test_update_by_filter_multiple_fields(self, document_store: AzureAISearchDocumentStore, filterable_docs): + """Override to use a document_store with metadata fields for filterable_docs.""" + UpdateByFilterTest.test_update_by_filter_multiple_fields(document_store, filterable_docs) - # Try to update documents with category="C" (no matches) - updated_count = document_store.update_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "C"}, - fields={"status": "published"}, - ) - assert updated_count == 0 + @pytest.mark.parametrize( + "document_store", + [{"metadata_fields": {"category": str, "year": int, "status": str, "featured": bool}}], + indirect=True, + ) + def test_update_by_filter_advanced_filters(self, document_store: AzureAISearchDocumentStore): + """Override to use a document_store with category, year, status, featured metadata fields.""" + UpdateByFilterTest.test_update_by_filter_advanced_filters(document_store) @pytest.mark.parametrize( "document_store", From f91e400f1a5fb78e5d0e18f6b478cf7156898507 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Wed, 4 Feb 2026 14:33:45 +0100 Subject: [PATCH 20/54] removing duplicated tests from Astra --- .../astra/tests/test_document_store.py | 68 ------------------- 1 file changed, 68 deletions(-) diff --git a/integrations/astra/tests/test_document_store.py b/integrations/astra/tests/test_document_store.py index 3d2695d543..2e7cc0ec6f 100644 --- a/integrations/astra/tests/test_document_store.py +++ b/integrations/astra/tests/test_document_store.py @@ -204,74 +204,6 @@ def test_filter_documents_by_in_operator(self, document_store): self.assert_documents_are_equal([result[0]], [docs[0]]) self.assert_documents_are_equal([result[1]], [docs[1]]) - def test_delete_all_documents(self, document_store: AstraDocumentStore): - """ - Test delete_all_documents() on an Astra. - """ - document_store.delete_all_documents() - assert document_store.count_documents() == 0 - - def test_delete_by_filter(self, document_store: AstraDocumentStore, filterable_docs): - document_store.write_documents(filterable_docs) - initial_count = document_store.count_documents() - assert initial_count > 0 - - # count documents that match the filter before deletion - matching_docs = [d for d in filterable_docs if d.meta.get("chapter") == "intro"] - expected_deleted_count = len(matching_docs) - - # delete all documents with chapter="intro" - deleted_count = document_store.delete_by_filter( - filters={"field": "meta.chapter", "operator": "==", "value": "intro"} - ) - - assert deleted_count == expected_deleted_count - assert document_store.count_documents() == initial_count - deleted_count - - # remaining documents don't have chapter="intro" - remaining_docs = document_store.filter_documents() - for doc in remaining_docs: - assert doc.meta.get("chapter") != "intro" - - # all documents with chapter="intro" were deleted - intro_docs = document_store.filter_documents( - filters={"field": "meta.chapter", "operator": "==", "value": "intro"} - ) - assert len(intro_docs) == 0 - - def test_update_by_filter(self, document_store: AstraDocumentStore, filterable_docs): - document_store.write_documents(filterable_docs) - initial_count = document_store.count_documents() - assert initial_count > 0 - - # count documents that match the filter before update - matching_docs = [d for d in filterable_docs if d.meta.get("chapter") == "intro"] - expected_updated_count = len(matching_docs) - - # update all documents with chapter="intro" to have status="updated" - updated_count = document_store.update_by_filter( - filters={"field": "meta.chapter", "operator": "==", "value": "intro"}, - meta={"status": "updated"}, - ) - - assert updated_count == expected_updated_count - assert document_store.count_documents() == initial_count - - # verify the updated documents have the new metadata - updated_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "updated"} - ) - assert len(updated_docs) == expected_updated_count - for doc in updated_docs: - assert doc.meta.get("chapter") == "intro" - assert doc.meta.get("status") == "updated" - - # verify other documents weren't affected - all_docs = document_store.filter_documents() - for doc in all_docs: - if doc.meta.get("chapter") != "intro": - assert doc.meta.get("status") != "updated" - @pytest.mark.skip(reason="Unsupported filter operator not.") def test_not_operator(self, document_store, filterable_docs): pass From 7ed085f6e861f46a5da40e0d90dfbe02e8ed6899 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Wed, 4 Feb 2026 16:03:25 +0100 Subject: [PATCH 21/54] adding UpdateByFilterTest to Weavite --- integrations/weaviate/tests/test_document_store.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integrations/weaviate/tests/test_document_store.py b/integrations/weaviate/tests/test_document_store.py index 25fb91c1d5..b42b8bfcef 100644 --- a/integrations/weaviate/tests/test_document_store.py +++ b/integrations/weaviate/tests/test_document_store.py @@ -16,6 +16,7 @@ CountDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, + UpdateByFilterTest, WriteDocumentsTest, create_filterable_docs, ) @@ -47,7 +48,7 @@ def test_init_is_lazy(_mock_client): @pytest.mark.integration -class TestWeaviateDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest): +class TestWeaviateDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, UpdateByFilterTest): @pytest.fixture def document_store(self, request) -> WeaviateDocumentStore: # Use a different index for each test so we can run them in parallel From 76ae1933196cef35b4f75cacb4511c3eafc7c288 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Wed, 4 Feb 2026 16:17:58 +0100 Subject: [PATCH 22/54] fixing Azure linting issues --- integrations/azure_ai_search/tests/conftest.py | 2 +- integrations/azure_ai_search/tests/test_document_store.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/integrations/azure_ai_search/tests/conftest.py b/integrations/azure_ai_search/tests/conftest.py index af288822f0..f77c9cde5b 100644 --- a/integrations/azure_ai_search/tests/conftest.py +++ b/integrations/azure_ai_search/tests/conftest.py @@ -70,7 +70,7 @@ def delete_by_filter_and_wait(filters): time.sleep(SLEEP_TIME_IN_SECONDS) return deleted_count - def update_by_filter_and_wait(filters, meta=None, fields=None, **kwargs): + def update_by_filter_and_wait(filters, meta=None, fields=None): updates = meta if meta is not None else fields or {} updated_count = original_update_by_filter(filters, updates) time.sleep(SLEEP_TIME_IN_SECONDS) diff --git a/integrations/azure_ai_search/tests/test_document_store.py b/integrations/azure_ai_search/tests/test_document_store.py index 97f7545b5d..aeb224d56a 100644 --- a/integrations/azure_ai_search/tests/test_document_store.py +++ b/integrations/azure_ai_search/tests/test_document_store.py @@ -16,7 +16,7 @@ DeleteDocumentsTest, FilterDocumentsTest, UpdateByFilterTest, - WriteDocumentsTest + WriteDocumentsTest, ) from haystack.utils.auth import EnvVarSecret, Secret @@ -319,7 +319,7 @@ def test_delete_by_filter_advanced_filters(self, document_store: AzureAISearchDo DeleteDocumentsTest.test_delete_by_filter_advanced_filters(document_store) # Metadata fields required by haystack UpdateByFilterTest filterable_docs (chapter, name, page, number, date, etc.) - _FILTERABLE_DOCS_METADATA = { + _FILTERABLE_DOCS_METADATA = { # noqa: RUF012 "name": str, "page": str, "chapter": str, From 64025a01970cc42232bb2eba10d2ec720f3f3454 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Wed, 4 Feb 2026 16:19:19 +0100 Subject: [PATCH 23/54] formatting --- integrations/azure_ai_search/tests/test_document_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/azure_ai_search/tests/test_document_store.py b/integrations/azure_ai_search/tests/test_document_store.py index aeb224d56a..e8e4e0b029 100644 --- a/integrations/azure_ai_search/tests/test_document_store.py +++ b/integrations/azure_ai_search/tests/test_document_store.py @@ -319,7 +319,7 @@ def test_delete_by_filter_advanced_filters(self, document_store: AzureAISearchDo DeleteDocumentsTest.test_delete_by_filter_advanced_filters(document_store) # Metadata fields required by haystack UpdateByFilterTest filterable_docs (chapter, name, page, number, date, etc.) - _FILTERABLE_DOCS_METADATA = { # noqa: RUF012 + _FILTERABLE_DOCS_METADATA = { # noqa: RUF012 "name": str, "page": str, "chapter": str, From aebfed78aa6b05dcc0d18d27a7462be1988e1b3c Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Wed, 4 Feb 2026 16:26:33 +0100 Subject: [PATCH 24/54] formatting --- integrations/opensearch/tests/test_document_store.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/integrations/opensearch/tests/test_document_store.py b/integrations/opensearch/tests/test_document_store.py index 5d10e56e46..61b9bb4d6e 100644 --- a/integrations/opensearch/tests/test_document_store.py +++ b/integrations/opensearch/tests/test_document_store.py @@ -9,7 +9,12 @@ from haystack.dataclasses.document import Document from haystack.document_stores.errors import DocumentStoreError, DuplicateDocumentError from haystack.document_stores.types import DuplicatePolicy -from haystack.testing.document_store import CountDocumentsTest, DeleteDocumentsTest, WriteDocumentsTest, UpdateByFilterTest +from haystack.testing.document_store import ( + CountDocumentsTest, + DeleteDocumentsTest, + UpdateByFilterTest, + WriteDocumentsTest, +) from opensearchpy.exceptions import RequestError from haystack_integrations.document_stores.opensearch import OpenSearchDocumentStore @@ -523,7 +528,6 @@ def test_delete_all_documents_index_recreation(self, document_store: OpenSearchD assert len(results) == 1 assert results[0].content == "New document after delete all" - def test_count_documents_by_filter(self, document_store: OpenSearchDocumentStore): docs = [ Document(content="Doc 1", meta={"category": "A", "status": "active"}), From c52bd3015da47fde7b437bca7f1db068b899dc06 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Wed, 4 Feb 2026 16:34:48 +0100 Subject: [PATCH 25/54] temporarly using haystack branch with new standard tests --- integrations/astra/pyproject.toml | 2 +- integrations/azure_ai_search/pyproject.toml | 2 +- integrations/chroma/pyproject.toml | 2 +- integrations/elasticsearch/pyproject.toml | 2 +- integrations/opensearch/pyproject.toml | 2 +- integrations/opensearch/tests/test_document_store.py | 3 ++- integrations/pgvector/pyproject.toml | 2 +- integrations/pinecone/pyproject.toml | 2 +- integrations/qdrant/pyproject.toml | 2 +- integrations/weaviate/pyproject.toml | 2 +- 10 files changed, 11 insertions(+), 10 deletions(-) diff --git a/integrations/astra/pyproject.toml b/integrations/astra/pyproject.toml index 152d93a486..5e6d1e7917 100644 --- a/integrations/astra/pyproject.toml +++ b/integrations/astra/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = ["haystack-ai>=2.22.0", "pydantic", "typing_extensions", "astrapy>=1.5.0,<2.0"] +dependencies = [""haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", "pydantic", "typing_extensions", "astrapy>=1.5.0,<2.0"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/astra#readme" diff --git a/integrations/azure_ai_search/pyproject.toml b/integrations/azure_ai_search/pyproject.toml index 740ee4d376..3364eed997 100644 --- a/integrations/azure_ai_search/pyproject.toml +++ b/integrations/azure_ai_search/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = ["haystack-ai>=2.22.0", "azure-search-documents>=11.5", "azure-identity"] +dependencies = [""haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests"", "azure-search-documents>=11.5", "azure-identity"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/azure_ai_search#readme" diff --git a/integrations/chroma/pyproject.toml b/integrations/chroma/pyproject.toml index 8283899e3d..80b83ae6e8 100644 --- a/integrations/chroma/pyproject.toml +++ b/integrations/chroma/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = ["haystack-ai>=2.22.0", "chromadb>=1.0.2"] +dependencies = ["haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", "chromadb>=1.0.2"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/chroma#readme" diff --git a/integrations/elasticsearch/pyproject.toml b/integrations/elasticsearch/pyproject.toml index f8c32250c3..5f64597b0b 100644 --- a/integrations/elasticsearch/pyproject.toml +++ b/integrations/elasticsearch/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai>=2.22.0", + "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", "elasticsearch>=8,<9", "aiohttp>=3.9.0" # for async support https://elasticsearch-py.readthedocs.io/en/latest/async.html#valueerror-when-initializing-asyncelasticsearch ] diff --git a/integrations/opensearch/pyproject.toml b/integrations/opensearch/pyproject.toml index d6dd9e4487..c5b235db76 100644 --- a/integrations/opensearch/pyproject.toml +++ b/integrations/opensearch/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ ] dependencies = [ - "haystack-ai>=2.22.0", + "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", "opensearch-py[async]>=3.0.0" ] diff --git a/integrations/opensearch/tests/test_document_store.py b/integrations/opensearch/tests/test_document_store.py index 61b9bb4d6e..bb2aaeab09 100644 --- a/integrations/opensearch/tests/test_document_store.py +++ b/integrations/opensearch/tests/test_document_store.py @@ -17,8 +17,9 @@ ) from opensearchpy.exceptions import RequestError -from haystack_integrations.document_stores.opensearch import OpenSearchDocumentStore from haystack_integrations.document_stores.opensearch.document_store import DEFAULT_MAX_CHUNK_BYTES +from haystack_integrations.document_stores.opensearch import OpenSearchDocumentStore + @patch("haystack_integrations.document_stores.opensearch.document_store.OpenSearch") diff --git a/integrations/pgvector/pyproject.toml b/integrations/pgvector/pyproject.toml index 89cbcbce4b..744c3e1840 100644 --- a/integrations/pgvector/pyproject.toml +++ b/integrations/pgvector/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = ["haystack-ai>=2.22.0", "pgvector>=0.3.0", "psycopg[binary]"] +dependencies = ["haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", "pgvector>=0.3.0", "psycopg[binary]"] [project.urls] Source = "https://github.com/deepset-ai/haystack-core-integrations" diff --git a/integrations/pinecone/pyproject.toml b/integrations/pinecone/pyproject.toml index f079757b8c..1786df100e 100644 --- a/integrations/pinecone/pyproject.toml +++ b/integrations/pinecone/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai>=2.22.0", + "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", "pinecone[asyncio]>=7.0.0", ] diff --git a/integrations/qdrant/pyproject.toml b/integrations/qdrant/pyproject.toml index f4284ded16..9d4ddd22ab 100644 --- a/integrations/qdrant/pyproject.toml +++ b/integrations/qdrant/pyproject.toml @@ -25,7 +25,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = ["haystack-ai>=2.22.0", "qdrant-client>=1.12.0"] +dependencies = ["haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", "qdrant-client>=1.12.0"] [project.urls] Source = "https://github.com/deepset-ai/haystack-core-integrations" diff --git a/integrations/weaviate/pyproject.toml b/integrations/weaviate/pyproject.toml index d52d4db397..8a8b996648 100644 --- a/integrations/weaviate/pyproject.toml +++ b/integrations/weaviate/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai>=2.22.0", + "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", "weaviate-client>=4.9", "python-dateutil", ] From cfcb9d91cfc646b17636eb0168314dd19666c3d2 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Wed, 4 Feb 2026 17:09:19 +0100 Subject: [PATCH 26/54] temporarly using haystack branch with new standard tests --- integrations/astra/pyproject.toml | 7 ++++++- integrations/azure_ai_search/pyproject.toml | 2 +- integrations/mongodb_atlas/pyproject.toml | 6 +++++- integrations/opensearch/tests/test_document_store.py | 3 +-- integrations/pgvector/pyproject.toml | 3 +++ integrations/pgvector/tests/test_document_store.py | 2 +- integrations/pinecone/tests/test_document_store.py | 6 +++--- integrations/qdrant/pyproject.toml | 7 ++++++- integrations/qdrant/tests/test_document_store.py | 3 +-- integrations/weaviate/pyproject.toml | 4 ++++ integrations/weaviate/tests/test_document_store.py | 8 +++++++- 11 files changed, 38 insertions(+), 13 deletions(-) diff --git a/integrations/astra/pyproject.toml b/integrations/astra/pyproject.toml index 5e6d1e7917..e56ff5f27d 100644 --- a/integrations/astra/pyproject.toml +++ b/integrations/astra/pyproject.toml @@ -22,7 +22,12 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [""haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", "pydantic", "typing_extensions", "astrapy>=1.5.0,<2.0"] +dependencies = [ + "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", + "pydantic", + "typing_extensions", + "astrapy>=1.5.0,<2.0" +] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/astra#readme" diff --git a/integrations/azure_ai_search/pyproject.toml b/integrations/azure_ai_search/pyproject.toml index 3364eed997..1bd373e1cb 100644 --- a/integrations/azure_ai_search/pyproject.toml +++ b/integrations/azure_ai_search/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = [""haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests"", "azure-search-documents>=11.5", "azure-identity"] +dependencies = ["haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", "azure-search-documents>=11.5", "azure-identity"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/azure_ai_search#readme" diff --git a/integrations/mongodb_atlas/pyproject.toml b/integrations/mongodb_atlas/pyproject.toml index 77c0dcad5b..fd8fe4f45a 100644 --- a/integrations/mongodb_atlas/pyproject.toml +++ b/integrations/mongodb_atlas/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai>=2.22.0", + "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", "pymongo[srv]>=4.13.0" ] @@ -35,6 +35,10 @@ Issues = "https://github.com/deepset-ai/haystack-core-integrations/issues" [tool.hatch.build.targets.wheel] packages = ["src/haystack_integrations"] +[tool.hatch.metadata] +allow-direct-references = true + + [tool.hatch.version] source = "vcs" tag-pattern = 'integrations\/mongodb_atlas-v(?P.*)' diff --git a/integrations/opensearch/tests/test_document_store.py b/integrations/opensearch/tests/test_document_store.py index bb2aaeab09..61b9bb4d6e 100644 --- a/integrations/opensearch/tests/test_document_store.py +++ b/integrations/opensearch/tests/test_document_store.py @@ -17,9 +17,8 @@ ) from opensearchpy.exceptions import RequestError -from haystack_integrations.document_stores.opensearch.document_store import DEFAULT_MAX_CHUNK_BYTES from haystack_integrations.document_stores.opensearch import OpenSearchDocumentStore - +from haystack_integrations.document_stores.opensearch.document_store import DEFAULT_MAX_CHUNK_BYTES @patch("haystack_integrations.document_stores.opensearch.document_store.OpenSearch") diff --git a/integrations/pgvector/pyproject.toml b/integrations/pgvector/pyproject.toml index 744c3e1840..bb00bc6cae 100644 --- a/integrations/pgvector/pyproject.toml +++ b/integrations/pgvector/pyproject.toml @@ -32,6 +32,9 @@ Issues = "https://github.com/deepset-ai/haystack-core-integrations/issues" [tool.hatch.build.targets.wheel] packages = ["src/haystack_integrations"] +[tool.hatch.metadata] +allow-direct-references = true + [tool.hatch.version] source = "vcs" tag-pattern = 'integrations\/pgvector-v(?P.*)' diff --git a/integrations/pgvector/tests/test_document_store.py b/integrations/pgvector/tests/test_document_store.py index 2fa5f9ec1f..5927837444 100644 --- a/integrations/pgvector/tests/test_document_store.py +++ b/integrations/pgvector/tests/test_document_store.py @@ -12,8 +12,8 @@ from haystack.testing.document_store import ( CountDocumentsTest, DeleteDocumentsTest, - WriteDocumentsTest, UpdateByFilterTest, + WriteDocumentsTest, ) from haystack.utils import Secret diff --git a/integrations/pinecone/tests/test_document_store.py b/integrations/pinecone/tests/test_document_store.py index a46b1b677c..8432c71ff6 100644 --- a/integrations/pinecone/tests/test_document_store.py +++ b/integrations/pinecone/tests/test_document_store.py @@ -12,10 +12,10 @@ from haystack.components.preprocessors import DocumentSplitter from haystack.components.retrievers import SentenceWindowRetriever from haystack.testing.document_store import ( - CountDocumentsTest, - DeleteDocumentsTest, - WriteDocumentsTest, + CountDocumentsTest, + DeleteDocumentsTest, UpdateByFilterTest, + WriteDocumentsTest, ) from haystack.utils import Secret from pinecone import Pinecone, PodSpec, ServerlessSpec diff --git a/integrations/qdrant/pyproject.toml b/integrations/qdrant/pyproject.toml index 9d4ddd22ab..05dd55adea 100644 --- a/integrations/qdrant/pyproject.toml +++ b/integrations/qdrant/pyproject.toml @@ -25,7 +25,10 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = ["haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", "qdrant-client>=1.12.0"] +dependencies = [ + "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", + "qdrant-client>=1.12.0" +] [project.urls] Source = "https://github.com/deepset-ai/haystack-core-integrations" @@ -77,6 +80,8 @@ non_interactive = true check_untyped_defs = true disallow_incomplete_defs = true +[tool.hatch.metadata] +allow-direct-references = true [tool.ruff] line-length = 120 diff --git a/integrations/qdrant/tests/test_document_store.py b/integrations/qdrant/tests/test_document_store.py index 8f5f789fdd..72b9f6b65d 100644 --- a/integrations/qdrant/tests/test_document_store.py +++ b/integrations/qdrant/tests/test_document_store.py @@ -303,7 +303,6 @@ def test_set_up_collection_with_dimension_mismatch(self): with pytest.raises(ValueError, match="different vector size"): document_store._set_up_collection("test_collection", 768, False, "cosine", False, False) - def test_delete_all_documents_index_recreation(self, document_store): document_store._initialize_client() @@ -326,7 +325,7 @@ def test_delete_all_documents_index_recreation(self, document_store): # ensure the collection still exists by writing documents again document_store.write_documents(docs) assert document_store.count_documents() == 5 - + def test_update_by_filter_preserves_vectors(self, document_store: QdrantDocumentStore): """Test that update_by_filter preserves document embeddings.""" docs = [ diff --git a/integrations/weaviate/pyproject.toml b/integrations/weaviate/pyproject.toml index 8a8b996648..f9eea7c189 100644 --- a/integrations/weaviate/pyproject.toml +++ b/integrations/weaviate/pyproject.toml @@ -36,6 +36,10 @@ Issues = "https://github.com/deepset-ai/haystack-core-integrations/issues" [tool.hatch.build.targets.wheel] packages = ["src/haystack_integrations"] +[tool.hatch.metadata] +allow-direct-references = true + + [tool.hatch.version] source = "vcs" tag-pattern = 'integrations\/weaviate-v(?P.*)' diff --git a/integrations/weaviate/tests/test_document_store.py b/integrations/weaviate/tests/test_document_store.py index b42b8bfcef..29cc07431b 100644 --- a/integrations/weaviate/tests/test_document_store.py +++ b/integrations/weaviate/tests/test_document_store.py @@ -48,7 +48,13 @@ def test_init_is_lazy(_mock_client): @pytest.mark.integration -class TestWeaviateDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, UpdateByFilterTest): +class TestWeaviateDocumentStore( + CountDocumentsTest, + WriteDocumentsTest, + DeleteDocumentsTest, + FilterDocumentsTest, + UpdateByFilterTest +): @pytest.fixture def document_store(self, request) -> WeaviateDocumentStore: # Use a different index for each test so we can run them in parallel From 6be83a1feffc0a4a242294ef2fd8061efdca15bb Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Wed, 4 Feb 2026 17:34:58 +0100 Subject: [PATCH 27/54] formatting --- integrations/weaviate/tests/test_document_store.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/integrations/weaviate/tests/test_document_store.py b/integrations/weaviate/tests/test_document_store.py index 29cc07431b..bef5847ba8 100644 --- a/integrations/weaviate/tests/test_document_store.py +++ b/integrations/weaviate/tests/test_document_store.py @@ -49,11 +49,7 @@ def test_init_is_lazy(_mock_client): @pytest.mark.integration class TestWeaviateDocumentStore( - CountDocumentsTest, - WriteDocumentsTest, - DeleteDocumentsTest, - FilterDocumentsTest, - UpdateByFilterTest + CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, UpdateByFilterTest ): @pytest.fixture def document_store(self, request) -> WeaviateDocumentStore: From 4ef9058acf91eb382abde26132b2062151fb3d42 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Wed, 4 Feb 2026 19:51:46 +0100 Subject: [PATCH 28/54] removing duplicated tests from Pinecone --- .../pinecone/tests/test_document_store.py | 96 ------------------- 1 file changed, 96 deletions(-) diff --git a/integrations/pinecone/tests/test_document_store.py b/integrations/pinecone/tests/test_document_store.py index 8432c71ff6..be54ac3970 100644 --- a/integrations/pinecone/tests/test_document_store.py +++ b/integrations/pinecone/tests/test_document_store.py @@ -342,102 +342,6 @@ def test_sentence_window_retriever(self, document_store: PineconeDocumentStore): assert len(result["context_windows"]) == 1 - def test_delete_by_filter(self, document_store: PineconeDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A"}), - Document(content="Doc 2", meta={"category": "B"}), - Document(content="Doc 3", meta={"category": "A"}), - ] - document_store.write_documents(docs) - - # delete documents with category="A" - deleted_count = document_store.delete_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "A"} - ) - assert deleted_count == 2 - assert document_store.count_documents() == 1 - - # verify only category B remains - remaining_docs = document_store.filter_documents() - assert len(remaining_docs) == 1 - assert remaining_docs[0].meta["category"] == "B" - - def test_delete_by_filter_no_matches(self, document_store: PineconeDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A"}), - Document(content="Doc 2", meta={"category": "B"}), - ] - document_store.write_documents(docs) - - # try to delete documents with category="C" (no matches) - deleted_count = document_store.delete_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "C"} - ) - assert deleted_count == 0 - assert document_store.count_documents() == 2 - - def test_update_by_filter(self, document_store: PineconeDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "status": "draft"}), - Document(content="Doc 2", meta={"category": "B", "status": "draft"}), - Document(content="Doc 3", meta={"category": "A", "status": "draft"}), - ] - document_store.write_documents(docs) - - # update status for category="A" documents - updated_count = document_store.update_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "A"}, meta={"status": "published"} - ) - assert updated_count == 2 - - published_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "published"} - ) - assert len(published_docs) == 2 - for doc in published_docs: - assert doc.meta["category"] == "A" - assert doc.meta["status"] == "published" - - def test_update_by_filter_multiple_fields(self, document_store: PineconeDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A", "status": "draft", "priority": "low"}), - Document(content="Doc 2", meta={"category": "B", "status": "draft", "priority": "low"}), - Document(content="Doc 3", meta={"category": "A", "status": "draft", "priority": "low"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 3 - - # Update multiple fields for category="A" documents - updated_count = document_store.update_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "A"}, - meta={"status": "published", "priority": "high"}, - ) - assert updated_count == 2 - - # Verify the updates - published_docs = document_store.filter_documents( - filters={"field": "meta.status", "operator": "==", "value": "published"} - ) - assert len(published_docs) == 2 - for doc in published_docs: - assert doc.meta["category"] == "A" - assert doc.meta["status"] == "published" - assert doc.meta["priority"] == "high" - - def test_update_by_filter_no_matches(self, document_store: PineconeDocumentStore): - docs = [ - Document(content="Doc 1", meta={"category": "A"}), - Document(content="Doc 2", meta={"category": "B"}), - ] - document_store.write_documents(docs) - assert document_store.count_documents() == 2 - - # Try to update documents with category="C" (no matches) - updated_count = document_store.update_by_filter( - filters={"field": "meta.category", "operator": "==", "value": "C"}, meta={"status": "published"} - ) - assert updated_count == 0 - assert document_store.count_documents() == 2 def test_count_documents_by_filter(self, document_store: PineconeDocumentStore): docs = [ From 3c56a050a3c2be3713da82e1203a7dce0594501f Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 11:57:27 +0100 Subject: [PATCH 29/54] updating all tests to use new test class from haystack core --- integrations/astra/tests/test_document_store.py | 3 ++- integrations/azure_ai_search/tests/test_document_store.py | 4 ++-- integrations/chroma/tests/test_document_store.py | 4 ++-- integrations/elasticsearch/tests/test_document_store.py | 4 ++-- integrations/mongodb_atlas/tests/test_document_store.py | 4 ++-- integrations/opensearch/tests/test_document_store.py | 4 ++-- integrations/pgvector/tests/test_document_store.py | 4 ++-- integrations/pinecone/tests/test_document_store.py | 4 ++-- integrations/qdrant/tests/test_document_store.py | 4 ++-- integrations/weaviate/tests/test_document_store.py | 4 ++-- 10 files changed, 20 insertions(+), 19 deletions(-) diff --git a/integrations/astra/tests/test_document_store.py b/integrations/astra/tests/test_document_store.py index 2e7cc0ec6f..46a29e0bcc 100644 --- a/integrations/astra/tests/test_document_store.py +++ b/integrations/astra/tests/test_document_store.py @@ -11,6 +11,7 @@ from haystack.document_stores.errors import MissingDocumentError from haystack.document_stores.types import DuplicatePolicy from haystack.testing.document_store import DocumentStoreBaseTests +from haystack.testing.document_store import DocumentStoreBaseExtendedTests from haystack_integrations.document_stores.astra import AstraDocumentStore @@ -48,7 +49,7 @@ def test_to_dict(mock_auth): # noqa os.environ.get("ASTRA_DB_APPLICATION_TOKEN", "") == "", reason="ASTRA_DB_APPLICATION_TOKEN env var not set" ) @pytest.mark.skipif(os.environ.get("ASTRA_DB_API_ENDPOINT", "") == "", reason="ASTRA_DB_API_ENDPOINT env var not set") -class TestDocumentStore(DocumentStoreBaseTests): +class TestDocumentStore(DocumentStoreBaseTests, DocumentStoreBaseExtendedTests): """ Common test cases will be provided by `DocumentStoreBaseTests` but you can add more to this class. diff --git a/integrations/azure_ai_search/tests/test_document_store.py b/integrations/azure_ai_search/tests/test_document_store.py index e8e4e0b029..b8db44ef20 100644 --- a/integrations/azure_ai_search/tests/test_document_store.py +++ b/integrations/azure_ai_search/tests/test_document_store.py @@ -14,8 +14,8 @@ from haystack.testing.document_store import ( CountDocumentsTest, DeleteDocumentsTest, + DocumentStoreBaseExtendedTests, FilterDocumentsTest, - UpdateByFilterTest, WriteDocumentsTest, ) from haystack.utils.auth import EnvVarSecret, Secret @@ -257,7 +257,7 @@ def _assert_documents_are_equal(received: list[Document], expected: list[Documen not os.environ.get("AZURE_AI_SEARCH_ENDPOINT", None) and not os.environ.get("AZURE_AI_SEARCH_API_KEY", None), reason="Missing AZURE_AI_SEARCH_ENDPOINT or AZURE_AI_SEARCH_API_KEY.", ) -class TestDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, UpdateByFilterTest): +class TestDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, DocumentStoreBaseExtendedTests): def assert_documents_are_equal(self, received: list[Document], expected: list[Document]): _assert_documents_are_equal(received, expected) diff --git a/integrations/chroma/tests/test_document_store.py b/integrations/chroma/tests/test_document_store.py index cf2a05b2ca..9c97dd4b4c 100644 --- a/integrations/chroma/tests/test_document_store.py +++ b/integrations/chroma/tests/test_document_store.py @@ -16,7 +16,7 @@ CountDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, - UpdateByFilterTest, + DocumentStoreBaseExtendedTests, ) from haystack_integrations.document_stores.chroma import ChromaDocumentStore @@ -35,7 +35,7 @@ def clear_chroma_system_cache(): SharedSystemClient.clear_system_cache() -class TestDocumentStore(CountDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, UpdateByFilterTest): +class TestDocumentStore(CountDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, DocumentStoreBaseExtendedTests): """ Common test cases will be provided by `DocumentStoreBaseTests` but you can add more to this class. diff --git a/integrations/elasticsearch/tests/test_document_store.py b/integrations/elasticsearch/tests/test_document_store.py index 2a024ce658..f97ac92464 100644 --- a/integrations/elasticsearch/tests/test_document_store.py +++ b/integrations/elasticsearch/tests/test_document_store.py @@ -10,7 +10,7 @@ from haystack.dataclasses.document import Document from haystack.document_stores.errors import DocumentStoreError, DuplicateDocumentError from haystack.document_stores.types import DuplicatePolicy -from haystack.testing.document_store import DocumentStoreBaseTests +from haystack.testing.document_store import DocumentStoreBaseTests, DocumentStoreBaseExtendedTests from haystack.utils import Secret from haystack.utils.auth import TokenSecret @@ -199,7 +199,7 @@ def test_client_initialization_with_api_key_string(_mock_async_es, _mock_es): @pytest.mark.integration -class TestDocumentStore(DocumentStoreBaseTests): +class TestDocumentStore(DocumentStoreBaseTests, DocumentStoreBaseExtendedTests): """ Common test cases will be provided by `DocumentStoreBaseTests` but you can add more to this class. diff --git a/integrations/mongodb_atlas/tests/test_document_store.py b/integrations/mongodb_atlas/tests/test_document_store.py index 87afdded2b..6a77ef1d42 100644 --- a/integrations/mongodb_atlas/tests/test_document_store.py +++ b/integrations/mongodb_atlas/tests/test_document_store.py @@ -10,7 +10,7 @@ from haystack.dataclasses.document import ByteStream, Document from haystack.document_stores.errors import DuplicateDocumentError from haystack.document_stores.types import DuplicatePolicy -from haystack.testing.document_store import DocumentStoreBaseTests +from haystack.testing.document_store import DocumentStoreBaseTests, DocumentStoreBaseExtendedTests from haystack.utils import Secret from pymongo import MongoClient from pymongo.driver_info import DriverInfo @@ -116,7 +116,7 @@ def test_document_conversion_methods_with_custom_field_names(self, _mock_client) reason="No MongoDB Atlas connection string provided", ) @pytest.mark.integration -class TestDocumentStore(DocumentStoreBaseTests): +class TestDocumentStore(DocumentStoreBaseTests, DocumentStoreBaseExtendedTests): @pytest.fixture def document_store(self): database_name = "haystack_integration_test" diff --git a/integrations/opensearch/tests/test_document_store.py b/integrations/opensearch/tests/test_document_store.py index 61b9bb4d6e..d9454b8d53 100644 --- a/integrations/opensearch/tests/test_document_store.py +++ b/integrations/opensearch/tests/test_document_store.py @@ -12,7 +12,7 @@ from haystack.testing.document_store import ( CountDocumentsTest, DeleteDocumentsTest, - UpdateByFilterTest, + DocumentStoreBaseExtendedTests, WriteDocumentsTest, ) from opensearchpy.exceptions import RequestError @@ -156,7 +156,7 @@ def test_routing_in_delete(mock_bulk, document_store): @pytest.mark.integration -class TestDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, UpdateByFilterTest): +class TestDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, DocumentStoreBaseExtendedTests): """ Common test cases will be provided by `DocumentStoreBaseTests` but you can add more to this class. diff --git a/integrations/pgvector/tests/test_document_store.py b/integrations/pgvector/tests/test_document_store.py index 5927837444..7061f6d9f2 100644 --- a/integrations/pgvector/tests/test_document_store.py +++ b/integrations/pgvector/tests/test_document_store.py @@ -12,7 +12,7 @@ from haystack.testing.document_store import ( CountDocumentsTest, DeleteDocumentsTest, - UpdateByFilterTest, + DocumentStoreBaseExtendedTests, WriteDocumentsTest, ) from haystack.utils import Secret @@ -21,7 +21,7 @@ @pytest.mark.integration -class TestDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, UpdateByFilterTest): +class TestDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, DocumentStoreBaseExtendedTests): def test_write_documents(self, document_store: PgvectorDocumentStore): docs = [Document(id="1")] assert document_store.write_documents(docs) == 1 diff --git a/integrations/pinecone/tests/test_document_store.py b/integrations/pinecone/tests/test_document_store.py index be54ac3970..5940a52916 100644 --- a/integrations/pinecone/tests/test_document_store.py +++ b/integrations/pinecone/tests/test_document_store.py @@ -14,7 +14,7 @@ from haystack.testing.document_store import ( CountDocumentsTest, DeleteDocumentsTest, - UpdateByFilterTest, + DocumentStoreBaseExtendedTests, WriteDocumentsTest, ) from haystack.utils import Secret @@ -265,7 +265,7 @@ def test_serverless_index_creation_from_scratch(delete_sleep_time): @pytest.mark.integration @pytest.mark.skipif(not os.environ.get("PINECONE_API_KEY"), reason="PINECONE_API_KEY not set") -class TestDocumentStore(CountDocumentsTest, DeleteDocumentsTest, WriteDocumentsTest, UpdateByFilterTest): +class TestDocumentStore(CountDocumentsTest, DeleteDocumentsTest, WriteDocumentsTest, DocumentStoreBaseExtendedTests): def test_write_documents(self, document_store: PineconeDocumentStore): docs = [Document(id="1")] assert document_store.write_documents(docs) == 1 diff --git a/integrations/qdrant/tests/test_document_store.py b/integrations/qdrant/tests/test_document_store.py index 72b9f6b65d..83e1fd4a98 100644 --- a/integrations/qdrant/tests/test_document_store.py +++ b/integrations/qdrant/tests/test_document_store.py @@ -8,7 +8,7 @@ from haystack.testing.document_store import ( CountDocumentsTest, DeleteDocumentsTest, - UpdateByFilterTest, + DocumentStoreBaseExtendedTests, WriteDocumentsTest, _random_embeddings, ) @@ -23,7 +23,7 @@ ) -class TestQdrantDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, UpdateByFilterTest): +class TestQdrantDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, DocumentStoreBaseExtendedTests): @pytest.fixture def document_store(self) -> QdrantDocumentStore: return QdrantDocumentStore( diff --git a/integrations/weaviate/tests/test_document_store.py b/integrations/weaviate/tests/test_document_store.py index bef5847ba8..8669d74294 100644 --- a/integrations/weaviate/tests/test_document_store.py +++ b/integrations/weaviate/tests/test_document_store.py @@ -16,7 +16,7 @@ CountDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, - UpdateByFilterTest, + DocumentStoreBaseExtendedTests, WriteDocumentsTest, create_filterable_docs, ) @@ -49,7 +49,7 @@ def test_init_is_lazy(_mock_client): @pytest.mark.integration class TestWeaviateDocumentStore( - CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, UpdateByFilterTest + CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, DocumentStoreBaseExtendedTests ): @pytest.fixture def document_store(self, request) -> WeaviateDocumentStore: From 862176129d46311cf88ed55dbe5f7911df6a78a2 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 12:37:00 +0100 Subject: [PATCH 30/54] fixing imports for 3.10 --- integrations/astra/tests/test_document_store.py | 3 +-- integrations/weaviate/tests/test_document_store.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/integrations/astra/tests/test_document_store.py b/integrations/astra/tests/test_document_store.py index 46a29e0bcc..fef31ae887 100644 --- a/integrations/astra/tests/test_document_store.py +++ b/integrations/astra/tests/test_document_store.py @@ -10,8 +10,7 @@ from haystack import Document from haystack.document_stores.errors import MissingDocumentError from haystack.document_stores.types import DuplicatePolicy -from haystack.testing.document_store import DocumentStoreBaseTests -from haystack.testing.document_store import DocumentStoreBaseExtendedTests +from haystack.testing.document_store import DocumentStoreBaseExtendedTests, DocumentStoreBaseTests from haystack_integrations.document_stores.astra import AstraDocumentStore diff --git a/integrations/weaviate/tests/test_document_store.py b/integrations/weaviate/tests/test_document_store.py index 8669d74294..b7673a8699 100644 --- a/integrations/weaviate/tests/test_document_store.py +++ b/integrations/weaviate/tests/test_document_store.py @@ -15,8 +15,8 @@ from haystack.testing.document_store import ( CountDocumentsTest, DeleteDocumentsTest, - FilterDocumentsTest, DocumentStoreBaseExtendedTests, + FilterDocumentsTest, WriteDocumentsTest, create_filterable_docs, ) From 51c5f24b3b62c73fb24a7b4f00b2e100f3e6471b Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 13:02:17 +0100 Subject: [PATCH 31/54] fixing linting issues --- integrations/chroma/tests/test_document_store.py | 2 +- integrations/elasticsearch/tests/test_document_store.py | 2 +- integrations/mongodb_atlas/tests/test_document_store.py | 2 +- integrations/pinecone/tests/test_document_store.py | 1 - integrations/qdrant/tests/test_document_store.py | 4 +++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/integrations/chroma/tests/test_document_store.py b/integrations/chroma/tests/test_document_store.py index 9c97dd4b4c..302d69b2a8 100644 --- a/integrations/chroma/tests/test_document_store.py +++ b/integrations/chroma/tests/test_document_store.py @@ -15,8 +15,8 @@ TEST_EMBEDDING_1, CountDocumentsTest, DeleteDocumentsTest, - FilterDocumentsTest, DocumentStoreBaseExtendedTests, + FilterDocumentsTest, ) from haystack_integrations.document_stores.chroma import ChromaDocumentStore diff --git a/integrations/elasticsearch/tests/test_document_store.py b/integrations/elasticsearch/tests/test_document_store.py index f97ac92464..6696708e13 100644 --- a/integrations/elasticsearch/tests/test_document_store.py +++ b/integrations/elasticsearch/tests/test_document_store.py @@ -10,7 +10,7 @@ from haystack.dataclasses.document import Document from haystack.document_stores.errors import DocumentStoreError, DuplicateDocumentError from haystack.document_stores.types import DuplicatePolicy -from haystack.testing.document_store import DocumentStoreBaseTests, DocumentStoreBaseExtendedTests +from haystack.testing.document_store import DocumentStoreBaseExtendedTests, DocumentStoreBaseTests from haystack.utils import Secret from haystack.utils.auth import TokenSecret diff --git a/integrations/mongodb_atlas/tests/test_document_store.py b/integrations/mongodb_atlas/tests/test_document_store.py index 6a77ef1d42..dc846f6fe3 100644 --- a/integrations/mongodb_atlas/tests/test_document_store.py +++ b/integrations/mongodb_atlas/tests/test_document_store.py @@ -10,7 +10,7 @@ from haystack.dataclasses.document import ByteStream, Document from haystack.document_stores.errors import DuplicateDocumentError from haystack.document_stores.types import DuplicatePolicy -from haystack.testing.document_store import DocumentStoreBaseTests, DocumentStoreBaseExtendedTests +from haystack.testing.document_store import DocumentStoreBaseExtendedTests, DocumentStoreBaseTests from haystack.utils import Secret from pymongo import MongoClient from pymongo.driver_info import DriverInfo diff --git a/integrations/pinecone/tests/test_document_store.py b/integrations/pinecone/tests/test_document_store.py index 5940a52916..a23a316a4a 100644 --- a/integrations/pinecone/tests/test_document_store.py +++ b/integrations/pinecone/tests/test_document_store.py @@ -342,7 +342,6 @@ def test_sentence_window_retriever(self, document_store: PineconeDocumentStore): assert len(result["context_windows"]) == 1 - def test_count_documents_by_filter(self, document_store: PineconeDocumentStore): docs = [ Document(content="Doc 1", meta={"category": "A", "status": "draft"}), diff --git a/integrations/qdrant/tests/test_document_store.py b/integrations/qdrant/tests/test_document_store.py index 83e1fd4a98..c69c1a8fb1 100644 --- a/integrations/qdrant/tests/test_document_store.py +++ b/integrations/qdrant/tests/test_document_store.py @@ -23,7 +23,9 @@ ) -class TestQdrantDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, DocumentStoreBaseExtendedTests): +class TestQdrantDocumentStore( + CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, DocumentStoreBaseExtendedTests + ): @pytest.fixture def document_store(self) -> QdrantDocumentStore: return QdrantDocumentStore( From 1076980c14d2ac37199dff47382d7c3ca965df3e Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 13:16:53 +0100 Subject: [PATCH 32/54] fixing azure_ai_search overrides due to class changes in haystack core --- .../tests/test_document_store.py | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/integrations/azure_ai_search/tests/test_document_store.py b/integrations/azure_ai_search/tests/test_document_store.py index b8db44ef20..8948ce40b8 100644 --- a/integrations/azure_ai_search/tests/test_document_store.py +++ b/integrations/azure_ai_search/tests/test_document_store.py @@ -13,9 +13,11 @@ from haystack.errors import FilterError from haystack.testing.document_store import ( CountDocumentsTest, + DeleteAllTest, + DeleteByFilterTest, DeleteDocumentsTest, - DocumentStoreBaseExtendedTests, FilterDocumentsTest, + UpdateByFilterTest, WriteDocumentsTest, ) from haystack.utils.auth import EnvVarSecret, Secret @@ -257,7 +259,15 @@ def _assert_documents_are_equal(received: list[Document], expected: list[Documen not os.environ.get("AZURE_AI_SEARCH_ENDPOINT", None) and not os.environ.get("AZURE_AI_SEARCH_API_KEY", None), reason="Missing AZURE_AI_SEARCH_ENDPOINT or AZURE_AI_SEARCH_API_KEY.", ) -class TestDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, DocumentStoreBaseExtendedTests): +class TestDocumentStore( + CountDocumentsTest, + DeleteDocumentsTest, + DeleteAllTest, + DeleteByFilterTest, + WriteDocumentsTest, + UpdateByFilterTest, + +): def assert_documents_are_equal(self, received: list[Document], expected: list[Document]): _assert_documents_are_equal(received, expected) @@ -298,7 +308,7 @@ def test_write_documents_duplicate_skip(self, document_store: AzureAISearchDocum ) def test_delete_by_filter(self, document_store: AzureAISearchDocumentStore): """Override to use a document_store with category metadata field.""" - DeleteDocumentsTest.test_delete_by_filter(document_store) + DeleteByFilterTest.test_delete_by_filter(document_store) @pytest.mark.parametrize( "document_store", @@ -307,7 +317,7 @@ def test_delete_by_filter(self, document_store: AzureAISearchDocumentStore): ) def test_delete_by_filter_no_matches(self, document_store: AzureAISearchDocumentStore): """Override to use a document_store with category metadata field.""" - DeleteDocumentsTest.test_delete_by_filter_no_matches(document_store) + DeleteByFilterTest.test_delete_by_filter_no_matches(document_store) @pytest.mark.parametrize( "document_store", @@ -316,7 +326,7 @@ def test_delete_by_filter_no_matches(self, document_store: AzureAISearchDocument ) def test_delete_by_filter_advanced_filters(self, document_store: AzureAISearchDocumentStore): """Override to use a document_store with category, year, status metadata fields.""" - DeleteDocumentsTest.test_delete_by_filter_advanced_filters(document_store) + DeleteByFilterTest.test_delete_by_filter_advanced_filters(document_store) # Metadata fields required by haystack UpdateByFilterTest filterable_docs (chapter, name, page, number, date, etc.) _FILTERABLE_DOCS_METADATA = { # noqa: RUF012 From 06dfe545f9d90c3ab24c8f5397e5592ef6b2f17f Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 15:24:43 +0100 Subject: [PATCH 33/54] fixing linting --- integrations/azure_ai_search/tests/test_document_store.py | 1 - integrations/qdrant/tests/test_document_store.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/integrations/azure_ai_search/tests/test_document_store.py b/integrations/azure_ai_search/tests/test_document_store.py index 8948ce40b8..e21aae4e8d 100644 --- a/integrations/azure_ai_search/tests/test_document_store.py +++ b/integrations/azure_ai_search/tests/test_document_store.py @@ -266,7 +266,6 @@ class TestDocumentStore( DeleteByFilterTest, WriteDocumentsTest, UpdateByFilterTest, - ): def assert_documents_are_equal(self, received: list[Document], expected: list[Document]): _assert_documents_are_equal(received, expected) diff --git a/integrations/qdrant/tests/test_document_store.py b/integrations/qdrant/tests/test_document_store.py index c69c1a8fb1..aa1eb7f03f 100644 --- a/integrations/qdrant/tests/test_document_store.py +++ b/integrations/qdrant/tests/test_document_store.py @@ -25,7 +25,7 @@ class TestQdrantDocumentStore( CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, DocumentStoreBaseExtendedTests - ): +): @pytest.fixture def document_store(self) -> QdrantDocumentStore: return QdrantDocumentStore( From 0c55060285f0a2da1908752302b1209655430fad Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 16:03:30 +0100 Subject: [PATCH 34/54] chaning imports due to MRO errors + changing document_stores fixtures when needed due to new method from ExtendedTests --- integrations/astra/tests/test_document_store.py | 6 +++--- .../elasticsearch/tests/test_document_store.py | 8 ++++---- integrations/opensearch/tests/conftest.py | 15 ++++++++++++--- .../opensearch/tests/test_document_store.py | 16 ++++++++-------- 4 files changed, 27 insertions(+), 18 deletions(-) diff --git a/integrations/astra/tests/test_document_store.py b/integrations/astra/tests/test_document_store.py index fef31ae887..5235c3fae5 100644 --- a/integrations/astra/tests/test_document_store.py +++ b/integrations/astra/tests/test_document_store.py @@ -10,7 +10,7 @@ from haystack import Document from haystack.document_stores.errors import MissingDocumentError from haystack.document_stores.types import DuplicatePolicy -from haystack.testing.document_store import DocumentStoreBaseExtendedTests, DocumentStoreBaseTests +from haystack.testing.document_store import DocumentStoreBaseExtendedTests from haystack_integrations.document_stores.astra import AstraDocumentStore @@ -48,9 +48,9 @@ def test_to_dict(mock_auth): # noqa os.environ.get("ASTRA_DB_APPLICATION_TOKEN", "") == "", reason="ASTRA_DB_APPLICATION_TOKEN env var not set" ) @pytest.mark.skipif(os.environ.get("ASTRA_DB_API_ENDPOINT", "") == "", reason="ASTRA_DB_API_ENDPOINT env var not set") -class TestDocumentStore(DocumentStoreBaseTests, DocumentStoreBaseExtendedTests): +class TestDocumentStore(DocumentStoreBaseExtendedTests): """ - Common test cases will be provided by `DocumentStoreBaseTests` but + Common test cases will be provided by `DocumentStoreBaseExtendedTests` but you can add more to this class. """ diff --git a/integrations/elasticsearch/tests/test_document_store.py b/integrations/elasticsearch/tests/test_document_store.py index 6696708e13..19c5f3eb19 100644 --- a/integrations/elasticsearch/tests/test_document_store.py +++ b/integrations/elasticsearch/tests/test_document_store.py @@ -10,7 +10,7 @@ from haystack.dataclasses.document import Document from haystack.document_stores.errors import DocumentStoreError, DuplicateDocumentError from haystack.document_stores.types import DuplicatePolicy -from haystack.testing.document_store import DocumentStoreBaseExtendedTests, DocumentStoreBaseTests +from haystack.testing.document_store import DocumentStoreBaseExtendedTests from haystack.utils import Secret from haystack.utils.auth import TokenSecret @@ -199,14 +199,14 @@ def test_client_initialization_with_api_key_string(_mock_async_es, _mock_es): @pytest.mark.integration -class TestDocumentStore(DocumentStoreBaseTests, DocumentStoreBaseExtendedTests): +class TestDocumentStore(DocumentStoreBaseExtendedTests): """ - Common test cases will be provided by `DocumentStoreBaseTests` but + Common test cases will be provided by `DocumentStoreBaseExtendedTests` but you can add more to this class. """ @pytest.fixture - def document_store(self, request): + def document_store(self, request, document_store): """ This is the most basic requirement for the child class: provide an instance of this document store so the base class can use it. diff --git a/integrations/opensearch/tests/conftest.py b/integrations/opensearch/tests/conftest.py index 2ae8462faa..04ccee7981 100644 --- a/integrations/opensearch/tests/conftest.py +++ b/integrations/opensearch/tests/conftest.py @@ -17,10 +17,10 @@ def _get_unique_index_name() -> str: @pytest.fixture -def document_store(): +def opensearch_document_store(): """ - We use this document store for basic tests and for testing filters. - `return_embedding` is set to True because in filters tests we compare embeddings. + OpenSearch document store instance. + Used by document_store and by TestDocumentStore to override the base test class fixture. """ hosts = ["https://localhost:9200"] index = _get_unique_index_name() @@ -44,6 +44,15 @@ def document_store(): asyncio.run(store._async_client.close()) +@pytest.fixture +def document_store(opensearch_document_store): + """ + We use this document store for basic tests and for testing filters. + `return_embedding` is set to True because in filters tests we compare embeddings. + """ + yield opensearch_document_store + + @pytest.fixture def document_store_2(): hosts = ["https://localhost:9200"] diff --git a/integrations/opensearch/tests/test_document_store.py b/integrations/opensearch/tests/test_document_store.py index d9454b8d53..f9fecb738d 100644 --- a/integrations/opensearch/tests/test_document_store.py +++ b/integrations/opensearch/tests/test_document_store.py @@ -9,12 +9,7 @@ from haystack.dataclasses.document import Document from haystack.document_stores.errors import DocumentStoreError, DuplicateDocumentError from haystack.document_stores.types import DuplicatePolicy -from haystack.testing.document_store import ( - CountDocumentsTest, - DeleteDocumentsTest, - DocumentStoreBaseExtendedTests, - WriteDocumentsTest, -) +from haystack.testing.document_store import DocumentStoreBaseExtendedTests from opensearchpy.exceptions import RequestError from haystack_integrations.document_stores.opensearch import OpenSearchDocumentStore @@ -156,12 +151,17 @@ def test_routing_in_delete(mock_bulk, document_store): @pytest.mark.integration -class TestDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, DocumentStoreBaseExtendedTests): +class TestDocumentStore(DocumentStoreBaseExtendedTests): """ - Common test cases will be provided by `DocumentStoreBaseTests` but + Common test cases will be provided by `DocumentStoreBaseExtendedTests` but you can add more to this class. """ + @pytest.fixture + def document_store(self, opensearch_document_store): + """Override base class fixture to provide OpenSearch document store.""" + yield opensearch_document_store + def assert_documents_are_equal(self, received: list[Document], expected: list[Document]): """ The OpenSearchDocumentStore.filter_documents() method returns a Documents with their score set. From 607b56193f25d609ae2bde51cadb23822e27c390 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 16:30:56 +0100 Subject: [PATCH 35/54] fixing weaviate tests and imports --- integrations/weaviate/tests/test_document_store.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/integrations/weaviate/tests/test_document_store.py b/integrations/weaviate/tests/test_document_store.py index b7673a8699..d40b3513b2 100644 --- a/integrations/weaviate/tests/test_document_store.py +++ b/integrations/weaviate/tests/test_document_store.py @@ -48,9 +48,7 @@ def test_init_is_lazy(_mock_client): @pytest.mark.integration -class TestWeaviateDocumentStore( - CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, DocumentStoreBaseExtendedTests -): +class TestWeaviateDocumentStore(DocumentStoreBaseExtendedTests): @pytest.fixture def document_store(self, request) -> WeaviateDocumentStore: # Use a different index for each test so we can run them in parallel From abc2cc9dc2565a7e7c5168a765e8365eba9828d7 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 16:35:05 +0100 Subject: [PATCH 36/54] fixing Qdrandt tests and imports --- integrations/qdrant/tests/test_document_store.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/integrations/qdrant/tests/test_document_store.py b/integrations/qdrant/tests/test_document_store.py index aa1eb7f03f..74cc0c8067 100644 --- a/integrations/qdrant/tests/test_document_store.py +++ b/integrations/qdrant/tests/test_document_store.py @@ -7,8 +7,11 @@ from haystack.document_stores.types import DuplicatePolicy from haystack.testing.document_store import ( CountDocumentsTest, + DeleteAllTest, + DeleteByFilterTest, DeleteDocumentsTest, - DocumentStoreBaseExtendedTests, + FilterableDocsFixtureMixin, + UpdateByFilterTest, WriteDocumentsTest, _random_embeddings, ) @@ -24,7 +27,13 @@ class TestQdrantDocumentStore( - CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, DocumentStoreBaseExtendedTests + CountDocumentsTest, + DeleteAllTest, + DeleteByFilterTest, + DeleteDocumentsTest, + FilterableDocsFixtureMixin, + UpdateByFilterTest, + WriteDocumentsTest, ): @pytest.fixture def document_store(self) -> QdrantDocumentStore: From db06bfec21654cad7dad6de5dca9d334d9020857 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 16:40:16 +0100 Subject: [PATCH 37/54] fixing PGVector tests --- .../pgvector/tests/test_document_store.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/integrations/pgvector/tests/test_document_store.py b/integrations/pgvector/tests/test_document_store.py index 7061f6d9f2..e667645b4e 100644 --- a/integrations/pgvector/tests/test_document_store.py +++ b/integrations/pgvector/tests/test_document_store.py @@ -12,7 +12,10 @@ from haystack.testing.document_store import ( CountDocumentsTest, DeleteDocumentsTest, - DocumentStoreBaseExtendedTests, + DeleteAllTest, + DeleteByFilterTest, + FilterableDocsFixtureMixin, + UpdateByFilterTest, WriteDocumentsTest, ) from haystack.utils import Secret @@ -21,7 +24,15 @@ @pytest.mark.integration -class TestDocumentStore(CountDocumentsTest, WriteDocumentsTest, DeleteDocumentsTest, DocumentStoreBaseExtendedTests): +class TestDocumentStore( + CountDocumentsTest, + DeleteAllTest, + DeleteByFilterTest, + DeleteDocumentsTest, + FilterableDocsFixtureMixin, + UpdateByFilterTest, + WriteDocumentsTest, +): def test_write_documents(self, document_store: PgvectorDocumentStore): docs = [Document(id="1")] assert document_store.write_documents(docs) == 1 From 55ddf42988b0b4f6e011732c889bb9430a667350 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 16:43:39 +0100 Subject: [PATCH 38/54] fixing Chroma tests + imports --- integrations/chroma/tests/test_document_store.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/integrations/chroma/tests/test_document_store.py b/integrations/chroma/tests/test_document_store.py index 302d69b2a8..a7cf5ab59a 100644 --- a/integrations/chroma/tests/test_document_store.py +++ b/integrations/chroma/tests/test_document_store.py @@ -15,8 +15,11 @@ TEST_EMBEDDING_1, CountDocumentsTest, DeleteDocumentsTest, - DocumentStoreBaseExtendedTests, + DeleteAllTest, + DeleteByFilterTest, FilterDocumentsTest, + FilterableDocsFixtureMixin, + UpdateByFilterTest, ) from haystack_integrations.document_stores.chroma import ChromaDocumentStore @@ -35,7 +38,7 @@ def clear_chroma_system_cache(): SharedSystemClient.clear_system_cache() -class TestDocumentStore(CountDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, DocumentStoreBaseExtendedTests): +class TestDocumentStore(CountDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, FilterableDocsFixtureMixin, UpdateByFilterTest, DeleteAllTest, DeleteByFilterTest): """ Common test cases will be provided by `DocumentStoreBaseTests` but you can add more to this class. From e858ad0955bf520d6ec65a97659561f1d9693293 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 16:54:41 +0100 Subject: [PATCH 39/54] pointing all pyproject.toml to main --- integrations/astra/pyproject.toml | 2 +- integrations/azure_ai_search/pyproject.toml | 2 +- integrations/chroma/pyproject.toml | 2 +- integrations/elasticsearch/pyproject.toml | 2 +- integrations/mongodb_atlas/pyproject.toml | 2 +- integrations/opensearch/pyproject.toml | 2 +- integrations/pgvector/pyproject.toml | 2 +- integrations/pinecone/pyproject.toml | 2 +- .../pinecone/tests/test_document_store.py | 15 +++++++++++++-- integrations/qdrant/pyproject.toml | 2 +- integrations/weaviate/pyproject.toml | 2 +- 11 files changed, 23 insertions(+), 12 deletions(-) diff --git a/integrations/astra/pyproject.toml b/integrations/astra/pyproject.toml index e56ff5f27d..df175445f8 100644 --- a/integrations/astra/pyproject.toml +++ b/integrations/astra/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", + "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", "pydantic", "typing_extensions", "astrapy>=1.5.0,<2.0" diff --git a/integrations/azure_ai_search/pyproject.toml b/integrations/azure_ai_search/pyproject.toml index 1bd373e1cb..9b4499bc38 100644 --- a/integrations/azure_ai_search/pyproject.toml +++ b/integrations/azure_ai_search/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = ["haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", "azure-search-documents>=11.5", "azure-identity"] +dependencies = ["haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", "azure-search-documents>=11.5", "azure-identity"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/azure_ai_search#readme" diff --git a/integrations/chroma/pyproject.toml b/integrations/chroma/pyproject.toml index 80b83ae6e8..22eb87fb66 100644 --- a/integrations/chroma/pyproject.toml +++ b/integrations/chroma/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = ["haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", "chromadb>=1.0.2"] +dependencies = ["haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", "chromadb>=1.0.2"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/chroma#readme" diff --git a/integrations/elasticsearch/pyproject.toml b/integrations/elasticsearch/pyproject.toml index 5f64597b0b..62f0733988 100644 --- a/integrations/elasticsearch/pyproject.toml +++ b/integrations/elasticsearch/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", + "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", "elasticsearch>=8,<9", "aiohttp>=3.9.0" # for async support https://elasticsearch-py.readthedocs.io/en/latest/async.html#valueerror-when-initializing-asyncelasticsearch ] diff --git a/integrations/mongodb_atlas/pyproject.toml b/integrations/mongodb_atlas/pyproject.toml index fd8fe4f45a..b4170fc5c6 100644 --- a/integrations/mongodb_atlas/pyproject.toml +++ b/integrations/mongodb_atlas/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", + "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", "pymongo[srv]>=4.13.0" ] diff --git a/integrations/opensearch/pyproject.toml b/integrations/opensearch/pyproject.toml index c5b235db76..98dae45746 100644 --- a/integrations/opensearch/pyproject.toml +++ b/integrations/opensearch/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ ] dependencies = [ - "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", + "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", "opensearch-py[async]>=3.0.0" ] diff --git a/integrations/pgvector/pyproject.toml b/integrations/pgvector/pyproject.toml index bb00bc6cae..56cea89afd 100644 --- a/integrations/pgvector/pyproject.toml +++ b/integrations/pgvector/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = ["haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", "pgvector>=0.3.0", "psycopg[binary]"] +dependencies = ["haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", "pgvector>=0.3.0", "psycopg[binary]"] [project.urls] Source = "https://github.com/deepset-ai/haystack-core-integrations" diff --git a/integrations/pinecone/pyproject.toml b/integrations/pinecone/pyproject.toml index 1786df100e..72d8c09bc8 100644 --- a/integrations/pinecone/pyproject.toml +++ b/integrations/pinecone/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", + "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", "pinecone[asyncio]>=7.0.0", ] diff --git a/integrations/pinecone/tests/test_document_store.py b/integrations/pinecone/tests/test_document_store.py index a23a316a4a..880dbb3d10 100644 --- a/integrations/pinecone/tests/test_document_store.py +++ b/integrations/pinecone/tests/test_document_store.py @@ -14,7 +14,10 @@ from haystack.testing.document_store import ( CountDocumentsTest, DeleteDocumentsTest, - DocumentStoreBaseExtendedTests, + DeleteAllTest, + DeleteByFilterTest, + FilterableDocsFixtureMixin, + UpdateByFilterTest, WriteDocumentsTest, ) from haystack.utils import Secret @@ -265,7 +268,15 @@ def test_serverless_index_creation_from_scratch(delete_sleep_time): @pytest.mark.integration @pytest.mark.skipif(not os.environ.get("PINECONE_API_KEY"), reason="PINECONE_API_KEY not set") -class TestDocumentStore(CountDocumentsTest, DeleteDocumentsTest, WriteDocumentsTest, DocumentStoreBaseExtendedTests): +class TestDocumentStore( + CountDocumentsTest, + DeleteDocumentsTest, + WriteDocumentsTest, + FilterableDocsFixtureMixin, + UpdateByFilterTest, + DeleteAllTest, + DeleteByFilterTest, +): def test_write_documents(self, document_store: PineconeDocumentStore): docs = [Document(id="1")] assert document_store.write_documents(docs) == 1 diff --git a/integrations/qdrant/pyproject.toml b/integrations/qdrant/pyproject.toml index 05dd55adea..e4b3975138 100644 --- a/integrations/qdrant/pyproject.toml +++ b/integrations/qdrant/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", + "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", "qdrant-client>=1.12.0" ] diff --git a/integrations/weaviate/pyproject.toml b/integrations/weaviate/pyproject.toml index f9eea7c189..2ce1765264 100644 --- a/integrations/weaviate/pyproject.toml +++ b/integrations/weaviate/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@feat/add-delete-all-documents-tests", + "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", "weaviate-client>=4.9", "python-dateutil", ] From f20f193395edbe05fd1974bac0b24528d4e976b6 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 17:07:28 +0100 Subject: [PATCH 40/54] fixing elasticsearch 3.10 arg not used --- integrations/chroma/tests/test_document_store.py | 10 +++++++++- .../elasticsearch/tests/test_document_store.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/integrations/chroma/tests/test_document_store.py b/integrations/chroma/tests/test_document_store.py index a7cf5ab59a..446f07496c 100644 --- a/integrations/chroma/tests/test_document_store.py +++ b/integrations/chroma/tests/test_document_store.py @@ -38,7 +38,15 @@ def clear_chroma_system_cache(): SharedSystemClient.clear_system_cache() -class TestDocumentStore(CountDocumentsTest, DeleteDocumentsTest, FilterDocumentsTest, FilterableDocsFixtureMixin, UpdateByFilterTest, DeleteAllTest, DeleteByFilterTest): +class TestDocumentStore( + CountDocumentsTest, + DeleteDocumentsTest, + FilterDocumentsTest, + FilterableDocsFixtureMixin, + UpdateByFilterTest, + DeleteAllTest, + DeleteByFilterTest, +): """ Common test cases will be provided by `DocumentStoreBaseTests` but you can add more to this class. diff --git a/integrations/elasticsearch/tests/test_document_store.py b/integrations/elasticsearch/tests/test_document_store.py index 19c5f3eb19..57ef435a9b 100644 --- a/integrations/elasticsearch/tests/test_document_store.py +++ b/integrations/elasticsearch/tests/test_document_store.py @@ -206,7 +206,7 @@ class TestDocumentStore(DocumentStoreBaseExtendedTests): """ @pytest.fixture - def document_store(self, request, document_store): + def document_store(self, request, document_store): # noqa: ARG002 """ This is the most basic requirement for the child class: provide an instance of this document store so the base class can use it. From 720deb41a304858f7cbea4f647ce4efa20ad3ae2 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 17:18:28 +0100 Subject: [PATCH 41/54] fixing mongodb imports --- integrations/mongodb_atlas/tests/test_document_store.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/mongodb_atlas/tests/test_document_store.py b/integrations/mongodb_atlas/tests/test_document_store.py index dc846f6fe3..5a3e4db1cb 100644 --- a/integrations/mongodb_atlas/tests/test_document_store.py +++ b/integrations/mongodb_atlas/tests/test_document_store.py @@ -10,7 +10,7 @@ from haystack.dataclasses.document import ByteStream, Document from haystack.document_stores.errors import DuplicateDocumentError from haystack.document_stores.types import DuplicatePolicy -from haystack.testing.document_store import DocumentStoreBaseExtendedTests, DocumentStoreBaseTests +from haystack.testing.document_store import DocumentStoreBaseExtendedTests from haystack.utils import Secret from pymongo import MongoClient from pymongo.driver_info import DriverInfo @@ -116,7 +116,7 @@ def test_document_conversion_methods_with_custom_field_names(self, _mock_client) reason="No MongoDB Atlas connection string provided", ) @pytest.mark.integration -class TestDocumentStore(DocumentStoreBaseTests, DocumentStoreBaseExtendedTests): +class TestDocumentStore(DocumentStoreBaseExtendedTests): @pytest.fixture def document_store(self): database_name = "haystack_integration_test" From e16a77202c0586ff5eaf18012d4a539d2a8db8ba Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 17:23:31 +0100 Subject: [PATCH 42/54] fixing chroma formatting --- integrations/chroma/tests/test_document_store.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/integrations/chroma/tests/test_document_store.py b/integrations/chroma/tests/test_document_store.py index 446f07496c..3b537c7b74 100644 --- a/integrations/chroma/tests/test_document_store.py +++ b/integrations/chroma/tests/test_document_store.py @@ -14,11 +14,11 @@ from haystack.testing.document_store import ( TEST_EMBEDDING_1, CountDocumentsTest, - DeleteDocumentsTest, DeleteAllTest, DeleteByFilterTest, - FilterDocumentsTest, + DeleteDocumentsTest, FilterableDocsFixtureMixin, + FilterDocumentsTest, UpdateByFilterTest, ) @@ -39,12 +39,12 @@ def clear_chroma_system_cache(): class TestDocumentStore( - CountDocumentsTest, - DeleteDocumentsTest, - FilterDocumentsTest, - FilterableDocsFixtureMixin, - UpdateByFilterTest, - DeleteAllTest, + CountDocumentsTest, + DeleteDocumentsTest, + FilterDocumentsTest, + FilterableDocsFixtureMixin, + UpdateByFilterTest, + DeleteAllTest, DeleteByFilterTest, ): """ From 2ba39f70e50eeba714443f5f6a462ea9eda8a8d7 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 17:24:21 +0100 Subject: [PATCH 43/54] fixing weaviate tests and imports --- integrations/pgvector/tests/test_document_store.py | 4 ++-- integrations/weaviate/tests/test_document_store.py | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/integrations/pgvector/tests/test_document_store.py b/integrations/pgvector/tests/test_document_store.py index e667645b4e..3ad679def7 100644 --- a/integrations/pgvector/tests/test_document_store.py +++ b/integrations/pgvector/tests/test_document_store.py @@ -11,9 +11,9 @@ from haystack.document_stores.types import DuplicatePolicy from haystack.testing.document_store import ( CountDocumentsTest, - DeleteDocumentsTest, DeleteAllTest, DeleteByFilterTest, + DeleteDocumentsTest, FilterableDocsFixtureMixin, UpdateByFilterTest, WriteDocumentsTest, @@ -25,7 +25,7 @@ @pytest.mark.integration class TestDocumentStore( - CountDocumentsTest, + CountDocumentsTest, DeleteAllTest, DeleteByFilterTest, DeleteDocumentsTest, diff --git a/integrations/weaviate/tests/test_document_store.py b/integrations/weaviate/tests/test_document_store.py index d40b3513b2..32747c82d2 100644 --- a/integrations/weaviate/tests/test_document_store.py +++ b/integrations/weaviate/tests/test_document_store.py @@ -13,11 +13,7 @@ from haystack.dataclasses.document import Document from haystack.document_stores.errors import DocumentStoreError from haystack.testing.document_store import ( - CountDocumentsTest, - DeleteDocumentsTest, DocumentStoreBaseExtendedTests, - FilterDocumentsTest, - WriteDocumentsTest, create_filterable_docs, ) from haystack.utils.auth import Secret From be16e20559058c0e34041b0e4f9729233119f322 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 17:41:18 +0100 Subject: [PATCH 44/54] fixing pinecone imports --- integrations/pinecone/tests/test_document_store.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/integrations/pinecone/tests/test_document_store.py b/integrations/pinecone/tests/test_document_store.py index 880dbb3d10..864b6127a1 100644 --- a/integrations/pinecone/tests/test_document_store.py +++ b/integrations/pinecone/tests/test_document_store.py @@ -13,9 +13,9 @@ from haystack.components.retrievers import SentenceWindowRetriever from haystack.testing.document_store import ( CountDocumentsTest, - DeleteDocumentsTest, DeleteAllTest, DeleteByFilterTest, + DeleteDocumentsTest, FilterableDocsFixtureMixin, UpdateByFilterTest, WriteDocumentsTest, @@ -269,12 +269,12 @@ def test_serverless_index_creation_from_scratch(delete_sleep_time): @pytest.mark.integration @pytest.mark.skipif(not os.environ.get("PINECONE_API_KEY"), reason="PINECONE_API_KEY not set") class TestDocumentStore( - CountDocumentsTest, - DeleteDocumentsTest, - WriteDocumentsTest, - FilterableDocsFixtureMixin, - UpdateByFilterTest, - DeleteAllTest, + CountDocumentsTest, + DeleteDocumentsTest, + WriteDocumentsTest, + FilterableDocsFixtureMixin, + UpdateByFilterTest, + DeleteAllTest, DeleteByFilterTest, ): def test_write_documents(self, document_store: PineconeDocumentStore): From cc54b455eed6204a8d0fb9dcc57179a46010e89a Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 22:55:15 +0100 Subject: [PATCH 45/54] attending PR comments --- .../elasticsearch/tests/test_document_store.py | 2 +- integrations/opensearch/tests/conftest.py | 11 +---------- integrations/opensearch/tests/test_document_store.py | 6 +++--- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/integrations/elasticsearch/tests/test_document_store.py b/integrations/elasticsearch/tests/test_document_store.py index 57ef435a9b..b9001743cb 100644 --- a/integrations/elasticsearch/tests/test_document_store.py +++ b/integrations/elasticsearch/tests/test_document_store.py @@ -206,7 +206,7 @@ class TestDocumentStore(DocumentStoreBaseExtendedTests): """ @pytest.fixture - def document_store(self, request, document_store): # noqa: ARG002 + def document_store(self, request): """ This is the most basic requirement for the child class: provide an instance of this document store so the base class can use it. diff --git a/integrations/opensearch/tests/conftest.py b/integrations/opensearch/tests/conftest.py index 04ccee7981..72b112b5ae 100644 --- a/integrations/opensearch/tests/conftest.py +++ b/integrations/opensearch/tests/conftest.py @@ -17,7 +17,7 @@ def _get_unique_index_name() -> str: @pytest.fixture -def opensearch_document_store(): +def document_store(): """ OpenSearch document store instance. Used by document_store and by TestDocumentStore to override the base test class fixture. @@ -44,15 +44,6 @@ def opensearch_document_store(): asyncio.run(store._async_client.close()) -@pytest.fixture -def document_store(opensearch_document_store): - """ - We use this document store for basic tests and for testing filters. - `return_embedding` is set to True because in filters tests we compare embeddings. - """ - yield opensearch_document_store - - @pytest.fixture def document_store_2(): hosts = ["https://localhost:9200"] diff --git a/integrations/opensearch/tests/test_document_store.py b/integrations/opensearch/tests/test_document_store.py index f9fecb738d..94c3ec938a 100644 --- a/integrations/opensearch/tests/test_document_store.py +++ b/integrations/opensearch/tests/test_document_store.py @@ -156,11 +156,11 @@ class TestDocumentStore(DocumentStoreBaseExtendedTests): Common test cases will be provided by `DocumentStoreBaseExtendedTests` but you can add more to this class. """ - + @pytest.fixture - def document_store(self, opensearch_document_store): + def document_store(self, document_store): """Override base class fixture to provide OpenSearch document store.""" - yield opensearch_document_store + yield document_store def assert_documents_are_equal(self, received: list[Document], expected: list[Document]): """ From f8f9380df4093933dcd98c2a8893cff827987dcb Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 22:59:18 +0100 Subject: [PATCH 46/54] removing white space --- integrations/opensearch/tests/test_document_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/opensearch/tests/test_document_store.py b/integrations/opensearch/tests/test_document_store.py index 94c3ec938a..9107788dce 100644 --- a/integrations/opensearch/tests/test_document_store.py +++ b/integrations/opensearch/tests/test_document_store.py @@ -156,7 +156,7 @@ class TestDocumentStore(DocumentStoreBaseExtendedTests): Common test cases will be provided by `DocumentStoreBaseExtendedTests` but you can add more to this class. """ - + @pytest.fixture def document_store(self, document_store): """Override base class fixture to provide OpenSearch document store.""" From 4dd4527afbeda9ae61af8fccb3f5d4f46b538532 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 23:06:59 +0100 Subject: [PATCH 47/54] adding filterable docs fixture to azure_ai_search --- integrations/azure_ai_search/tests/test_document_store.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/integrations/azure_ai_search/tests/test_document_store.py b/integrations/azure_ai_search/tests/test_document_store.py index e21aae4e8d..6fe2d45033 100644 --- a/integrations/azure_ai_search/tests/test_document_store.py +++ b/integrations/azure_ai_search/tests/test_document_store.py @@ -19,6 +19,7 @@ FilterDocumentsTest, UpdateByFilterTest, WriteDocumentsTest, + FilterableDocsFixtureMixin, ) from haystack.utils.auth import EnvVarSecret, Secret @@ -264,6 +265,7 @@ class TestDocumentStore( DeleteDocumentsTest, DeleteAllTest, DeleteByFilterTest, + FilterableDocsFixtureMixin, WriteDocumentsTest, UpdateByFilterTest, ): From 8973ee0f7e87dd72bdd6c26fc9f53357200c4c54 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 5 Feb 2026 23:07:45 +0100 Subject: [PATCH 48/54] fixing linter --- integrations/azure_ai_search/tests/test_document_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/azure_ai_search/tests/test_document_store.py b/integrations/azure_ai_search/tests/test_document_store.py index 6fe2d45033..31753f3e52 100644 --- a/integrations/azure_ai_search/tests/test_document_store.py +++ b/integrations/azure_ai_search/tests/test_document_store.py @@ -16,10 +16,10 @@ DeleteAllTest, DeleteByFilterTest, DeleteDocumentsTest, + FilterableDocsFixtureMixin, FilterDocumentsTest, UpdateByFilterTest, WriteDocumentsTest, - FilterableDocsFixtureMixin, ) from haystack.utils.auth import EnvVarSecret, Secret From 8e813551747626be5a9888d574eafdb57ae71b1e Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 12 Feb 2026 12:29:27 +0100 Subject: [PATCH 49/54] updating pyproject.toml to reference pypi instead of main branch --- integrations/astra/pyproject.toml | 2 +- integrations/azure_ai_search/pyproject.toml | 2 +- integrations/chroma/pyproject.toml | 2 +- integrations/elasticsearch/pyproject.toml | 2 +- integrations/mongodb_atlas/pyproject.toml | 2 +- integrations/opensearch/pyproject.toml | 2 +- integrations/pgvector/pyproject.toml | 2 +- integrations/pinecone/pyproject.toml | 2 +- integrations/qdrant/pyproject.toml | 2 +- integrations/weaviate/pyproject.toml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/integrations/astra/pyproject.toml b/integrations/astra/pyproject.toml index df175445f8..eb300714b1 100644 --- a/integrations/astra/pyproject.toml +++ b/integrations/astra/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", + "haystack-ai>=2.22.0", "pydantic", "typing_extensions", "astrapy>=1.5.0,<2.0" diff --git a/integrations/azure_ai_search/pyproject.toml b/integrations/azure_ai_search/pyproject.toml index 9b4499bc38..740ee4d376 100644 --- a/integrations/azure_ai_search/pyproject.toml +++ b/integrations/azure_ai_search/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = ["haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", "azure-search-documents>=11.5", "azure-identity"] +dependencies = ["haystack-ai>=2.22.0", "azure-search-documents>=11.5", "azure-identity"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/azure_ai_search#readme" diff --git a/integrations/chroma/pyproject.toml b/integrations/chroma/pyproject.toml index 22eb87fb66..8283899e3d 100644 --- a/integrations/chroma/pyproject.toml +++ b/integrations/chroma/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = ["haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", "chromadb>=1.0.2"] +dependencies = ["haystack-ai>=2.22.0", "chromadb>=1.0.2"] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/chroma#readme" diff --git a/integrations/elasticsearch/pyproject.toml b/integrations/elasticsearch/pyproject.toml index 62f0733988..f8c32250c3 100644 --- a/integrations/elasticsearch/pyproject.toml +++ b/integrations/elasticsearch/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", + "haystack-ai>=2.22.0", "elasticsearch>=8,<9", "aiohttp>=3.9.0" # for async support https://elasticsearch-py.readthedocs.io/en/latest/async.html#valueerror-when-initializing-asyncelasticsearch ] diff --git a/integrations/mongodb_atlas/pyproject.toml b/integrations/mongodb_atlas/pyproject.toml index b4170fc5c6..1127f19b30 100644 --- a/integrations/mongodb_atlas/pyproject.toml +++ b/integrations/mongodb_atlas/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", + "haystack-ai>=2.22.0", "pymongo[srv]>=4.13.0" ] diff --git a/integrations/opensearch/pyproject.toml b/integrations/opensearch/pyproject.toml index 98dae45746..d6dd9e4487 100644 --- a/integrations/opensearch/pyproject.toml +++ b/integrations/opensearch/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ ] dependencies = [ - "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", + "haystack-ai>=2.22.0", "opensearch-py[async]>=3.0.0" ] diff --git a/integrations/pgvector/pyproject.toml b/integrations/pgvector/pyproject.toml index 56cea89afd..5f51ffe691 100644 --- a/integrations/pgvector/pyproject.toml +++ b/integrations/pgvector/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = ["haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", "pgvector>=0.3.0", "psycopg[binary]"] +dependencies = ["haystack-ai>=2.22.0", "pgvector>=0.3.0", "psycopg[binary]"] [project.urls] Source = "https://github.com/deepset-ai/haystack-core-integrations" diff --git a/integrations/pinecone/pyproject.toml b/integrations/pinecone/pyproject.toml index 72d8c09bc8..f079757b8c 100644 --- a/integrations/pinecone/pyproject.toml +++ b/integrations/pinecone/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", + "haystack-ai>=2.22.0", "pinecone[asyncio]>=7.0.0", ] diff --git a/integrations/qdrant/pyproject.toml b/integrations/qdrant/pyproject.toml index e4b3975138..3cc0abcb55 100644 --- a/integrations/qdrant/pyproject.toml +++ b/integrations/qdrant/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", + "haystack-ai>=2.22.0", "qdrant-client>=1.12.0" ] diff --git a/integrations/weaviate/pyproject.toml b/integrations/weaviate/pyproject.toml index 2ce1765264..4a4f53c2d9 100644 --- a/integrations/weaviate/pyproject.toml +++ b/integrations/weaviate/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai @ git+https://github.com/deepset-ai/haystack.git@main", + "haystack-ai>=2.22.0", "weaviate-client>=4.9", "python-dateutil", ] From 45e76709ce88c5f6a631de1a6b2a3feb50cd53e6 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 12 Feb 2026 12:33:16 +0100 Subject: [PATCH 50/54] updating pyproject.toml to reference latest pypi instead of main branch --- integrations/astra/pyproject.toml | 8 ++++---- integrations/azure_ai_search/pyproject.toml | 6 +++++- integrations/chroma/pyproject.toml | 5 ++++- integrations/elasticsearch/pyproject.toml | 2 +- integrations/mongodb_atlas/pyproject.toml | 2 +- integrations/opensearch/pyproject.toml | 2 +- integrations/pgvector/pyproject.toml | 6 +++++- integrations/pinecone/pyproject.toml | 2 +- integrations/qdrant/pyproject.toml | 2 +- integrations/weaviate/pyproject.toml | 2 +- 10 files changed, 24 insertions(+), 13 deletions(-) diff --git a/integrations/astra/pyproject.toml b/integrations/astra/pyproject.toml index eb300714b1..b1325354ce 100644 --- a/integrations/astra/pyproject.toml +++ b/integrations/astra/pyproject.toml @@ -23,10 +23,10 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai>=2.22.0", - "pydantic", - "typing_extensions", - "astrapy>=1.5.0,<2.0" + "astrapy>=1.5.0,<2.0", + "haystack-ai>=2.24.0", + "pydantic", + "typing_extensions", ] [project.urls] diff --git a/integrations/azure_ai_search/pyproject.toml b/integrations/azure_ai_search/pyproject.toml index 740ee4d376..57fa4f6963 100644 --- a/integrations/azure_ai_search/pyproject.toml +++ b/integrations/azure_ai_search/pyproject.toml @@ -22,7 +22,11 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = ["haystack-ai>=2.22.0", "azure-search-documents>=11.5", "azure-identity"] +dependencies = [ + "haystack-ai>=2.24.0", + "azure-search-documents>=11.5", + "azure-identity" +] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/azure_ai_search#readme" diff --git a/integrations/chroma/pyproject.toml b/integrations/chroma/pyproject.toml index 8283899e3d..c5eb5ff205 100644 --- a/integrations/chroma/pyproject.toml +++ b/integrations/chroma/pyproject.toml @@ -22,7 +22,10 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = ["haystack-ai>=2.22.0", "chromadb>=1.0.2"] +dependencies = [ + "haystack-ai>=2.24.0", + "chromadb>=1.0.2" +] [project.urls] Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/chroma#readme" diff --git a/integrations/elasticsearch/pyproject.toml b/integrations/elasticsearch/pyproject.toml index f8c32250c3..75f9f07506 100644 --- a/integrations/elasticsearch/pyproject.toml +++ b/integrations/elasticsearch/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai>=2.22.0", + "haystack-ai>=2.24.0", "elasticsearch>=8,<9", "aiohttp>=3.9.0" # for async support https://elasticsearch-py.readthedocs.io/en/latest/async.html#valueerror-when-initializing-asyncelasticsearch ] diff --git a/integrations/mongodb_atlas/pyproject.toml b/integrations/mongodb_atlas/pyproject.toml index 1127f19b30..6fb3e9c9c0 100644 --- a/integrations/mongodb_atlas/pyproject.toml +++ b/integrations/mongodb_atlas/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai>=2.22.0", + "haystack-ai>=2.24.0", "pymongo[srv]>=4.13.0" ] diff --git a/integrations/opensearch/pyproject.toml b/integrations/opensearch/pyproject.toml index d6dd9e4487..3cf9940115 100644 --- a/integrations/opensearch/pyproject.toml +++ b/integrations/opensearch/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ ] dependencies = [ - "haystack-ai>=2.22.0", + "haystack-ai>=2.24.0", "opensearch-py[async]>=3.0.0" ] diff --git a/integrations/pgvector/pyproject.toml b/integrations/pgvector/pyproject.toml index 5f51ffe691..4f6a4baebe 100644 --- a/integrations/pgvector/pyproject.toml +++ b/integrations/pgvector/pyproject.toml @@ -22,7 +22,11 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -dependencies = ["haystack-ai>=2.22.0", "pgvector>=0.3.0", "psycopg[binary]"] +dependencies = [ + "haystack-ai>=2.24.0", + "pgvector>=0.3.0", + "psycopg[binary]" +] [project.urls] Source = "https://github.com/deepset-ai/haystack-core-integrations" diff --git a/integrations/pinecone/pyproject.toml b/integrations/pinecone/pyproject.toml index f079757b8c..56900f1e9e 100644 --- a/integrations/pinecone/pyproject.toml +++ b/integrations/pinecone/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai>=2.22.0", + "haystack-ai>=2.24.0", "pinecone[asyncio]>=7.0.0", ] diff --git a/integrations/qdrant/pyproject.toml b/integrations/qdrant/pyproject.toml index 3cc0abcb55..878924fe90 100644 --- a/integrations/qdrant/pyproject.toml +++ b/integrations/qdrant/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai>=2.22.0", + "haystack-ai>=2.24.0", "qdrant-client>=1.12.0" ] diff --git a/integrations/weaviate/pyproject.toml b/integrations/weaviate/pyproject.toml index 4a4f53c2d9..3c66ef78b1 100644 --- a/integrations/weaviate/pyproject.toml +++ b/integrations/weaviate/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "haystack-ai>=2.22.0", + "haystack-ai>=2.24.0", "weaviate-client>=4.9", "python-dateutil", ] From 580138976598aa570229a6ec3231b2b95534944f Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 12 Feb 2026 15:15:50 +0100 Subject: [PATCH 51/54] Update integrations/qdrant/pyproject.toml Co-authored-by: Stefano Fiorucci --- integrations/qdrant/pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/integrations/qdrant/pyproject.toml b/integrations/qdrant/pyproject.toml index 878924fe90..acbff15a4c 100644 --- a/integrations/qdrant/pyproject.toml +++ b/integrations/qdrant/pyproject.toml @@ -80,8 +80,6 @@ non_interactive = true check_untyped_defs = true disallow_incomplete_defs = true -[tool.hatch.metadata] -allow-direct-references = true [tool.ruff] line-length = 120 From 09112afe53618cc98556a63808350839f0e01072 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 12 Feb 2026 15:15:58 +0100 Subject: [PATCH 52/54] Update integrations/pgvector/pyproject.toml Co-authored-by: Stefano Fiorucci --- integrations/pgvector/pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/integrations/pgvector/pyproject.toml b/integrations/pgvector/pyproject.toml index 4f6a4baebe..3dbd0d5e04 100644 --- a/integrations/pgvector/pyproject.toml +++ b/integrations/pgvector/pyproject.toml @@ -36,9 +36,6 @@ Issues = "https://github.com/deepset-ai/haystack-core-integrations/issues" [tool.hatch.build.targets.wheel] packages = ["src/haystack_integrations"] -[tool.hatch.metadata] -allow-direct-references = true - [tool.hatch.version] source = "vcs" tag-pattern = 'integrations\/pgvector-v(?P.*)' From 35f1c1255052bb7fb2f65bead28e586b6b23863d Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 12 Feb 2026 15:16:06 +0100 Subject: [PATCH 53/54] Update integrations/mongodb_atlas/pyproject.toml Co-authored-by: Stefano Fiorucci --- integrations/mongodb_atlas/pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/integrations/mongodb_atlas/pyproject.toml b/integrations/mongodb_atlas/pyproject.toml index 6fb3e9c9c0..93172463de 100644 --- a/integrations/mongodb_atlas/pyproject.toml +++ b/integrations/mongodb_atlas/pyproject.toml @@ -35,10 +35,6 @@ Issues = "https://github.com/deepset-ai/haystack-core-integrations/issues" [tool.hatch.build.targets.wheel] packages = ["src/haystack_integrations"] -[tool.hatch.metadata] -allow-direct-references = true - - [tool.hatch.version] source = "vcs" tag-pattern = 'integrations\/mongodb_atlas-v(?P.*)' From ef0fec07bce91a721bd0ccfeae11dc7a7f31d55b Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 12 Feb 2026 15:16:14 +0100 Subject: [PATCH 54/54] Update integrations/weaviate/pyproject.toml Co-authored-by: Stefano Fiorucci --- integrations/weaviate/pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/integrations/weaviate/pyproject.toml b/integrations/weaviate/pyproject.toml index 3c66ef78b1..f27c8435d4 100644 --- a/integrations/weaviate/pyproject.toml +++ b/integrations/weaviate/pyproject.toml @@ -36,10 +36,6 @@ Issues = "https://github.com/deepset-ai/haystack-core-integrations/issues" [tool.hatch.build.targets.wheel] packages = ["src/haystack_integrations"] -[tool.hatch.metadata] -allow-direct-references = true - - [tool.hatch.version] source = "vcs" tag-pattern = 'integrations\/weaviate-v(?P.*)'