Skip to content

Commit

Permalink
Fix test_scorer (search) (redis#2920)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvora-h authored and zach-iee committed Sep 1, 2023
1 parent 179891d commit 56bef91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/test_asyncio/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
4 changes: 2 additions & 2 deletions tests/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 56bef91

Please # to comment.