Skip to content

Commit 0786195

Browse files
dvora-hzach-iee
authored andcommitted
Fix test_scorer (search) (redis#2920)
1 parent a76278a commit 0786195

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/test_asyncio/test_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,9 +743,9 @@ async def test_scorer(modclient: redis.Redis):
743743
res = await (
744744
modclient.ft().search(Query("quick").scorer("TFIDF.DOCNORM").with_scores())
745745
)
746-
assert 0.1111111111111111 == res.docs[0].score
746+
assert 0.14285714285714285 == res.docs[0].score
747747
res = await modclient.ft().search(Query("quick").scorer("BM25").with_scores())
748-
assert 0.17699114465425977 == res.docs[0].score
748+
assert 0.22471909420069797 == res.docs[0].score
749749
res = await modclient.ft().search(Query("quick").scorer("DISMAX").with_scores())
750750
assert 2.0 == res.docs[0].score
751751
res = await modclient.ft().search(Query("quick").scorer("DOCSCORE").with_scores())

tests/test_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,9 +697,9 @@ def test_scorer(client):
697697
res = client.ft().search(Query("quick").scorer("TFIDF").with_scores())
698698
assert 1.0 == res.docs[0].score
699699
res = client.ft().search(Query("quick").scorer("TFIDF.DOCNORM").with_scores())
700-
assert 0.1111111111111111 == res.docs[0].score
700+
assert 0.14285714285714285 == res.docs[0].score
701701
res = client.ft().search(Query("quick").scorer("BM25").with_scores())
702-
assert 0.17699114465425977 == res.docs[0].score
702+
assert 0.22471909420069797 == res.docs[0].score
703703
res = client.ft().search(Query("quick").scorer("DISMAX").with_scores())
704704
assert 2.0 == res.docs[0].score
705705
res = client.ft().search(Query("quick").scorer("DOCSCORE").with_scores())

0 commit comments

Comments
 (0)