From 56bef917f3e3fb56c29cbc387edad382d5103201 Mon Sep 17 00:00:00 2001 From: dvora-h <67596500+dvora-h@users.noreply.github.com> Date: Thu, 31 Aug 2023 12:26:48 +0300 Subject: [PATCH] Fix test_scorer (search) (#2920) --- tests/test_asyncio/test_search.py | 4 ++-- tests/test_search.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_asyncio/test_search.py b/tests/test_asyncio/test_search.py index 8707cdf61b..59380fa486 100644 --- a/tests/test_asyncio/test_search.py +++ b/tests/test_asyncio/test_search.py @@ -743,9 +743,9 @@ async def test_scorer(modclient: redis.Redis): res = await ( modclient.ft().search(Query("quick").scorer("TFIDF.DOCNORM").with_scores()) ) - assert 0.1111111111111111 == res.docs[0].score + assert 0.14285714285714285 == res.docs[0].score res = await modclient.ft().search(Query("quick").scorer("BM25").with_scores()) - assert 0.17699114465425977 == res.docs[0].score + assert 0.22471909420069797 == res.docs[0].score res = await modclient.ft().search(Query("quick").scorer("DISMAX").with_scores()) assert 2.0 == res.docs[0].score res = await modclient.ft().search(Query("quick").scorer("DOCSCORE").with_scores()) diff --git a/tests/test_search.py b/tests/test_search.py index 7a2428151e..a3526ce81b 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -699,9 +699,9 @@ def test_scorer(client): res = client.ft().search(Query("quick").scorer("TFIDF").with_scores()) assert 1.0 == res.docs[0].score res = client.ft().search(Query("quick").scorer("TFIDF.DOCNORM").with_scores()) - assert 0.1111111111111111 == res.docs[0].score + assert 0.14285714285714285 == res.docs[0].score res = client.ft().search(Query("quick").scorer("BM25").with_scores()) - assert 0.17699114465425977 == res.docs[0].score + assert 0.22471909420069797 == res.docs[0].score res = client.ft().search(Query("quick").scorer("DISMAX").with_scores()) assert 2.0 == res.docs[0].score res = client.ft().search(Query("quick").scorer("DOCSCORE").with_scores())