Skip to content

Commit 32f994d

Browse files
zach-ieedvora-h
andcommitted
Fix test_scorer (search) (redis#2920) (#16)
Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
1 parent e3110b1 commit 32f994d

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
@@ -699,9 +699,9 @@ def test_scorer(client):
699699
res = client.ft().search(Query("quick").scorer("TFIDF").with_scores())
700700
assert 1.0 == res.docs[0].score
701701
res = client.ft().search(Query("quick").scorer("TFIDF.DOCNORM").with_scores())
702-
assert 0.1111111111111111 == res.docs[0].score
702+
assert 0.14285714285714285 == res.docs[0].score
703703
res = client.ft().search(Query("quick").scorer("BM25").with_scores())
704-
assert 0.17699114465425977 == res.docs[0].score
704+
assert 0.22471909420069797 == res.docs[0].score
705705
res = client.ft().search(Query("quick").scorer("DISMAX").with_scores())
706706
assert 2.0 == res.docs[0].score
707707
res = client.ft().search(Query("quick").scorer("DOCSCORE").with_scores())

0 commit comments

Comments
 (0)