Skip to content

Commit

Permalink
Remove outdated test
Browse files Browse the repository at this point in the history
  • Loading branch information
vblagoje committed Sep 9, 2024
1 parent 35853b6 commit 7378b9f
Showing 1 changed file with 0 additions and 69 deletions.
69 changes: 0 additions & 69 deletions integrations/opensearch/tests/test_document_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,75 +574,6 @@ def test_bm25_retrieval_with_filters(self, document_store: OpenSearchDocumentSto
retrieved_ids = sorted([doc.id for doc in res])
assert retrieved_ids == ["1", "2", "3", "4", "5"]

def test_bm25_retrieval_with_legacy_filters(self, document_store: OpenSearchDocumentStore):
document_store.write_documents(
[
Document(
content="Haskell is a functional programming language",
meta={"likes": 100000, "language_type": "functional"},
id="1",
),
Document(
content="Lisp is a functional programming language",
meta={"likes": 10000, "language_type": "functional"},
id="2",
),
Document(
content="Exilir is a functional programming language",
meta={"likes": 1000, "language_type": "functional"},
id="3",
),
Document(
content="F# is a functional programming language",
meta={"likes": 100, "language_type": "functional"},
id="4",
),
Document(
content="C# is a functional programming language",
meta={"likes": 10, "language_type": "functional"},
id="5",
),
Document(
content="C++ is an object oriented programming language",
meta={"likes": 100000, "language_type": "object_oriented"},
id="6",
),
Document(
content="Dart is an object oriented programming language",
meta={"likes": 10000, "language_type": "object_oriented"},
id="7",
),
Document(
content="Go is an object oriented programming language",
meta={"likes": 1000, "language_type": "object_oriented"},
id="8",
),
Document(
content="Python is a object oriented programming language",
meta={"likes": 100, "language_type": "object_oriented"},
id="9",
),
Document(
content="Ruby is a object oriented programming language",
meta={"likes": 10, "language_type": "object_oriented"},
id="10",
),
Document(
content="PHP is a object oriented programming language",
meta={"likes": 1, "language_type": "object_oriented"},
id="11",
),
]
)

res = document_store._bm25_retrieval(
"programming",
top_k=10,
filters={"language_type": "functional"},
)
assert len(res) == 5
retrieved_ids = sorted([doc.id for doc in res])
assert retrieved_ids == ["1", "2", "3", "4", "5"]

def test_bm25_retrieval_with_custom_query(self, document_store: OpenSearchDocumentStore):
document_store.write_documents(
Expand Down

0 comments on commit 7378b9f

Please sign in to comment.