From 47d034a16807cd23b7a67e4eada0555478330b8b Mon Sep 17 00:00:00 2001 From: Vladimir Blagojevic Date: Thu, 15 Aug 2024 11:03:37 +0100 Subject: [PATCH] Update qdrant test_run_filters (#969) --- integrations/qdrant/tests/test_retriever.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/integrations/qdrant/tests/test_retriever.py b/integrations/qdrant/tests/test_retriever.py index a92f6917f..5a558db3b 100644 --- a/integrations/qdrant/tests/test_retriever.py +++ b/integrations/qdrant/tests/test_retriever.py @@ -151,7 +151,10 @@ def test_run_filters(self, filterable_docs: List[Document]): filters={"field": "meta.chapter", "operator": "==", "value": "abstract"}, return_embedding=False, )["documents"] - assert len(results) == 3 + # we need to combine init filter and run filter as the policy is MERGE + # when we combine these filters we use AND logical operator by default + # so the result should be 1 as we have only one document that matches both filters + assert len(results) == 1 for document in results: assert document.embedding is None